{"version":3,"sources":["app.js","contactUs/contactUs.js","dateSelector/dateSelector.js","core/core.ajax.js","header/header.js","documents/documents.js","home/home.js","login/login.js","pages/pages.js","paperwork/paperwork.js","reportSettings/reportSettings.js","account/payments/Payments.js","account/profile/profile.js","account/reports/reports.js","fuelCards/cards/fuelCardsCards.js","fuelCards/transactions/fuelCardsTransactions.js","fuelCards/prices/fuelCardsPrices.js","documents/account/account.js","orders/pricing/odPricing.js","orders/ordering/orders.js","httpService.js","core/core.constants.js","core/core.enums.js","core/core.error.js","core/core.objects.js","core/core.security.js","directives/core.directives.js","directives/pdi.ng.extensions.js","directives/pdi.ng.validate.js","Services/services.paymentAccounts.js","filters/core.filters.js","providers/core.providers.js","Services/services.browser.js","Services/services.bulkFuelPriceNotices.js","Services/services.contactUs.js","Services/services.customers.js","Services/services.documents.js","Services/services.edoc.js","Services/services.encrypt.js","Services/services.fuelCards.js","Services/services.globalizations.js","Services/services.home.js","Services/services.localizations.js","Services/services.logging.js","Services/services.orders.js","Services/services.pages.js","Services/services.paperwork.js","Services/services.paperworkDealerForms.js","Services/services.paperworkDeliveries.js","Services/services.paperworkMeters.js","Services/services.paperworkReports.js","Services/services.paperworkTanks.js","Services/services.payments.js","Services/services.profile.js","Services/services.reporting.js","Services/services.reports.js","Services/services.userAccounts.js","Services/services.warehousePriceNotices.js"],"names":["angular","module","config","$routeProvider","$httpProvider","$locationProvider","templateProvider","hashPrefix","when","templateUrl","getTemplate","controller","resolve","localStrings","localizationSvc","getCachedLocalizationsContainer","otherwise","interceptors","push","factory","$rootScope","$q","$injector","request","headers","loginInfo","userIsImpersonated","userId","userKey","userType","impersonatorUserId","impersonatorUserKey","impersonatorUserType","showLoader","response","get","pendingRequests","length","isAuthenticated","responseError","status","data","ExceptionMessage","match","notifier","show","getLocalizedString","reject","$scope","$http","Authentication","WebUserSvc","$location","WebFunctionGroups","WebFunctions","$window","BrowserService","WebProfileService","$timeout","$filter","encryptData","WebFunctionModules","PaymentService","PaperworkService","LoggingService","EdocService","localDateRangeStrings","openNewWindow","url","window","open","initialize","appInfo","profile","webUser","paperwork","fuelCards","userLoaded","profileKey","customText","backgroundImage","syscfg","isUndefinedOrNullOrEmpty","password","impersonationAccessGuid","undefined","path","search","indexOf","applySystemSettings","getLoggedInWebUserToken","logout","getAuthenticationToken","userToken","sessionExpired","clearInfo","goTo","amplify","store","rememberMe","locationInfo","functionGroup","webFunctions","menuLocation","subMenuLocation","sideMenu","sideMenuData","applyAction","then","Configuration","softwareVersion","SoftwareVersion","ContactUsText","poweredByPdiText","PoweredByPdiText","countryInfo","Country","passwordComplexity","PasswordComplexity","LandingLogoImage","LandingBannerImage","UseGoogleAnalytics","GoogleAnalyticsKey","isBlank","ga","applySystemSettingsSiteDisabled","initializeSiteDisabled","applySelectedProfile","getWebUser","CurrentWebProfile","Key","setProfileColor","PrimaryColor","authorizationIndex","getCurrentAuthorization","CurrentAuthorization","WebAuthorizations","MenuBackgroundImage","checkForAppliedProfile","setSubMenu","value","location","pendingNav","subMenu","setWebProfile","WebProfile","setSystemConfiguration","checkCurrentUserPermissions","contact","CustomerContact","CustomerContactWebFunctions","x","hasModuleAccess","checkCurrentCustomerModules","i","WebFnKey","Selected","checkCurrentUserPermission","AllWebFunctions","currentCustomer","Customer","isBulkFuel","BulkFuelCustomer","isCardLock","CardLockCustomer","isRetail","RetailCustomer","isWholesale","WholesaleCustomer","isWebEft","WebPmtEFTGrpKey","checkWebFunctionModules","openEdocByRefNo","type","key","refNo","custKey","renderEdocByRefNo","JSON","stringify","EdocDetailsKey","Type","RefNo","CustKey","edoc","createUrl","openEdoc","edocKey","renderEdoc","openEdocEmail","senderAddress","encrypt","encodeURIComponent","openAttachment","attachmentGuid","getWebProfileMessage","messageKey","$on","event","next","current","unLockPayments","CustContKey","EmailAddress","unockInvoices","batch","submitPaperworkCmdParms","SiteKey","PaperworkDate","urlFormatDate","SubmitPaperwork","PreviouslySubmitted","previous","rejection","aDate","ignoreIe","browser","getBrowserType","aDate2","Date","Object","prototype","toString","call","substr","parse","replace","isNaN","getTime","getFullYear","getMonth","slice","getDate","formatDate","formatDateTime","addDaysToDate","date","days","result","setDate","successEventListener","opResults","HasWarnings","forEach","Warnings","item","failedEventListener","_accountLockError","HasErrors","Errors","lockedAccount","errorEventListener","obj","errors","Stacktrace","StackTrace","logErrors","console","log","setFocusOnReady","elemID","setTimeout","$apply","$","focus","paymentsEnabled","WebPaymentsEnabled","UsesWebEFT","CustWebPaymentSettings","CurrentProfileTerms","AddandEditWebPaymentAccounts","AddandEditWebPayments","ActiveAccountCount","execOnReady","func","resetDirtyFlags","form","$setPristine","removeClass","resizeKendoGrid","grid","count","offset","widowHeight","innerHeight","setOptions","height","scrollable","initializeDateSelector","dateSelector","displaySelector","selection","startDate","startMin","startMax","endDate","endMin","endMax","numOfDays","maxNumOfDays","options","name","valid","overrideDefaults","hideAllDays","disabled","dateSelectorInitialized","localizationFilesListener","localizationFilesInitialized","$watch","setCachedLocalizations","modalifier","display","title","text","showConfirm","closeBtnTxt","confirmBtnTxt","hide","showSetupError","showSavedError","showNoResults","page","confirm","fnYes","fnNo","confirmYes","isUndefined","confirmNo","directive","restrict","require","link","scope","element","attrs","$formatters","modelValue","Number","$parsers","viewValue","ContactUs","Message","ct","st","m","this","ContactUsSubject","SubjectText","ContactUsMessage","CustomerContactKey","showContactUsModal","message","CommentContexts","showErrorBox","loadContactUsContext","$parent","sendMessage","toNumber","validateMessage","saveMessage","MessageSent","getAttrTextFromNodeMap","attr","attributes","getNamedItem","ApiServiceSettings","settings","method","params","responseType","skipValidations","ApiServiceOperationResult","Success","SuccessMsg","SucessMessage","ErrorTitle","ErrorMessages","WarningMessages","IsRedirect","RedirectUrl","Data","$provide","constant","templates","initDateSelector","onChange","validateStartAndEndDate","today","year","month","getDay","parseInt","showAccounts","showUserOpt","setMenuLocation","setSubMenuLocation","checkUserMenuSecurity","securityGroup","setNewCurrentAuthorization","index","retrieveSelectedProfile","Id","$broadcast","showAccountList","editUser","changePassword","showUserOptions","headerTimer","subMenuWaiter","menuKey","barWidth","document","getElementById","clientWidth","acctWidth","style","width","overflowX","startIndex","endIndex","SiteLayout","SubMenu","ParentKey","menuLength","setMenuVisibility","maxMenuWidth","currentMenuWidth","menuItem","visible","moveMenuLeft","moveMenuRight","$routeParams","$anchorScroll","menu","HeaderMenu","Name","header","sub","SideMenu","side","setSiteMenuLocation","val","menuObject","subMenuObject","menuText","subMenuText","documentService","getDocuments","ref","desc","start","end","docType","contKey","listDocuments","RefDateFormatted","RefDate","kendo","documentsGridInit","documents","documentsGrid","documentsGridOptions","autoBind","change","e","dataItem","select","Guid","columns","field","class","filterable","cell","operator","showOperators","template","dataSource","DataSource","editable","mode","extra","navigatable","pageable","selectable","sortable","ds","documentsGridDS","read","minDate","thisMenu","find","SourceType","SourceKey","documentType","referenceNumber","description","originalWhen","globalResolves","resolveWebUser","_user","route","extend","ajax","homeService","globalizationSvc","modalInfo","curArticle","toggleModal","modalHeader","modalContent","content","shown","updatePageInfo","loadHomePageInformation","PageInfo","formatArticles","formatCurrencies","accountChangeListener","showLastCreditNotification","DispType","HomeInfo","LastCreditNotification","emailPopUp","EdocDtlKey","AttachGUID","showAccountSummary","ViewCreditInformation","DisplayPastDueMsgAt","CrStatus","AccountNeedingVerificationv","showRecentActivity","homeInfo","ScheduledPayment","Amount","PendingEft","PostedEft","LastInvoice","CustomerActivity","LastRcptAmt","LastStmtAmt","CustomerPriceNotice","EdocDetails","DtlKey","getArticle","dir","Announcements","Text","trim","unescapeHTML","lastInv","lastStmt","lastEft","lastPmnt","pendEft","nextSchPmnt","acctBalance","AccountBalance","unbilledActivity","UnshippedBalance","creditLimit","CrLimitTotal","availableCred","AvailableCredit","AmountDisplay","formatCurrency","LastStmtAmtDisplay","LastRcptAmtDisplay","AccountBalanceDisplay","UnshippedBalanceDisplay","CrLimitTotalDisplay","AvailableCreditDisplay","validatorSvc","constantLists","showLogin","showProfileSelector","showForgotPassword","initializeLogin","clearValidationScopes","impersonationGuid","automatedLogin","getRememberMe","checkForAutomatedLogin","authenticateUser","executeValidations","error","passwordExpired","passwordDays","setRememberMe","login","user","token","Token","expires","timeout","validatePasswordComplexity","errorList","retrieveWebUser","err","webUserKey","Answer2","Answer","_webProfileCount","WebProfiles","loadSelectedProfile","getWebUserProfile","showForgotMyPassword","addScopeToValidate","submitForgotMyPassword","processForgotMyPassword","signup","displayControls","Timestamp","AnswerClear","GUID","Password","PasswordClear","Question","QuestionClear","Reset","Validated","controls","confirmPassword","question","answer","confirmAnswer","secretQuestions","instance","getWebUserForSignup","sendWebUser","signupWebUser","clearErrors","clearAllValidations","resetPassword","displayTitle","displayQuestion","displayPassword","displayButton","buttonText","getWebUserForPasswordReset","sendAnswer","verifyWebUserSecretQuestionAnswer","setNewPassword","resetWebUserPassword","submitInfo","webUserToUpdate","customMessage","submitPassword","OldPassword","pageInfo","oldPassword","success","userAccountService","resultMessage","cont","unsubscribeContact","Successful","Unsubscibed","initializePage","controllerAs","filter","input","PagesService","ctrl","Context","Pages","Tokens","ViewCustomPages","getWebProfileSiteLayout","customPagesMenuNode","MenuNodes","$sce","$interval","reloadInterval","selectedPage","conf","selectedIndex","pages","foundPage","retrieveToken","getAccessToken","AccessToken","MenuNode","ClientAuthMethod","trustAsResourceUrl","PageURL","access_token","msg","AuthMethods","Header","req","Authorization","frame","querySelector","contentWindow","write","close","failed","URL","glue","includes","token_type","expires_in","failure","isSelected","retval","PaperworkReportsService","PaperworkEntry","context","reports","reviewPaperwork","loaded","unposted","getPaperworkContext","paperworkSites","PaperworkSites","selectedSite","SelectedSiteKey","lockPaperworkAfterDru","LockPaperworkAfterDru","calculatedPriceToPriorDaysPriceVariance","CalculatedPriceToPriorDaysPriceVariance","calculatedPriceToCapturedRetailPriceVariance","CalculatedPriceToCapturedRetailPriceVariance","netSalesDollarsToCapturedRetailPriceNetUnitsVariance","NetSalesDollarsToCapturedRetailPriceNetUnitsVariance","setSiteDescByKey","showEnterPaperworkMenuItem","CanEnterPaperwork","getPaperworkReports","PaperworkReports","paperworkReports","site","selectedSiteObj","setupNav","retailWarningMessage","averageWarningMessage","setupAppNavigation","apps","app","MenuCode","deliveries","meters","tanks","DealerFormVersionKey","forms","AppKey","openNewPaperworkBatch","OpenPaperworkBatch","PaperworkBatch","PaperworkApps","PaperworkForm","siteInfo","PaperworkSiteInfo","paperworkKey","pwLoadedListener","viewOnly","navPg","menuCode","$$path","resolveCurrentPageMenuCode","getSinglePath","reportingService","$root","reportSettings","reportKey","inventorySummary","reportType","setSiteAndDate","NextPaperworkDate","unwrapReportSettings","loadOptions","wrapReportSettings","saveOptions","setNextPaperworkDate","getNextPaperworkDate","sender","sitekey","paperworkDate","args","format","ValidatePaperworkSiteDateForContact","qs","exportReport","renderReport","localizeReports","sort","compareDisplayNames","report","DisplayName","a","b","localeCompare","isFirstPage","isLastPage","HistoryLimit","maxDate","FutureLimit","getRouterPath","SubmitStatus","paperworkHistoryGrid","paperworkHistoryGridOptions","paperworkHistoryGridInit","paperworkHistoryGridDS","selectedReviewSite","viewPaperworkHistory","reviewLoaded","noRecordsFound","allEntry","InvtyCOGSDate","FuelCOGSDate","getPaperworkBatchesByDate","each","PaperworkDateFormatted","TotalFuelSales","loadPaperwork","isEntry","PaperworkMetersService","showRetailPrice","showEndingDollar","showNetDollars","showEndingUnits","showNetUnits","showAvgPrice","showBeginMeters","metersLoaded","kInputOptions","culture","getLocale","decimals","spinners","MaxUnits","scopesToValidate","metersEditable","OpenPaperworkBatchByKey","res","firstLastPage","nextApp","loadMeters","navigateToPage","pwSubMenu","meterIndex","gridColEditorInput","container","fieldName","required","kendoNumericTextBox","max","min","appendTo","gridColNumber","cellIndex","rowIndex","meterGridColIsEditable","model","DollarsEndingState","DollarsNetState","UnitsEndingState","UnitsNetState","FuelPositionUnitReading","FuelPositionDollarReading","onGridKeydown","keyCode","keys","TAB","shiftKey","focusPreviousEditableCell","focusNextEditableCell","initializeMetersGrid","metersGridDS","schema","id","fields","DispenserNo","FuelPositionNo","ProductDescription","RtlPrice","EndAmount","NetAmount","EndUnits","NetUnits","CalcPrice","aggregate","metersGridOptions","data-field","footerTemplate","editor","headerTemplate","hidden","aggregates","dataBinding","parent","dataBound","setupMetersRows","edit","$input","addClass","prop","currentCell","tbody","children","gridInputCellOnBlur","retailChange","endAmountChange","netAmountChange","endUnitsChange","netUnitsChange","row","col","$col","setupGridColumnValidationNotificationUI","setupMetersGridColumns","some","meter","metersGrid","hideColumn","widget","on","calculatePageTotals","qtip","position","adjust","y","classes","processGridColumnValidationNotification","$row","errorMessages","warningMessages","idx","hasErrors","hasWarnings","messageList","append","warningList","meterRowValidation","parms","calcTotalSales","isValid","uid","errorRtlPrice","warningRtlPrice","PriorCalcPrice","Math","abs","errorEndUnits","warningEndUnits","BeginUnits","errorEndAmount","warningEndAmount","BeginAmount","warningCalcPrice","validateMeters","newPWBatchLoadedListener","loadMetersForEntry","PCKey","PaperworkMeters","priceToleranceAmount","PriceToleranceAmount","ShowRetailPrice","ShowEndingDollar","ShowNetDollars","ShowEndingUnits","ShowNetUnits","ShowAvgPrice","ShowBeginMeters","DRUPosted","Status","PageStage","hasChanges","saveMeters","submit","processSubmit","HasBeenSubmitted","GetPaperworkBatchErrorWarning","submitPaperwork","fuelMetersAppInfo","HasData","IsRequired","isPrevious","paperworkMeterHeader","metersForm","FuelMtrKey","SiteDesc","ProfCtrKey","PaperworkBatchKey","UserName","Ts","HeaderTimeStamp","copy","toJSON","updateMeters","savePaperworkMeters","netAmountCalc","calcPerUnit","CheckAveragePriceToRetail","CheckAveragePriceOverDay","calculateNetAmountFromEnd","calculateNetUnitsFromEnd","totalAmount","calculatePageAmountTotals","totalUnits","calculatePageUnitTotals","nextCell","eq","hasClass","nextAll","editCell","prevAll","prev","openBeginMeter","beginAmount","beginUnits","useBeginUnits","useBeginAmount","openPumpTest","TestAmount","TestUnits","saveModalValues","BeginAmountOverride","BeginUnitsOverride","PaperworkTanksService","tanksLoaded","postedReadingsExist","NewOSComments","postedTanks","loadTanks","tankIndex","selectOnFocus","partialUnitsEditor","kendoComboBox","partialUnits","dataTextField","dataValueField","selectionElement","selectedRow","selectedRowData","calculateTankValues","calculateWaterVolumeValues","_filterSource","getPartialDescFromValue","Value","PartialUnits","noReadingChkClick","modelRow","getByUid","NoReading","set","initializeTanksGrid","tanksGridDS","TankNo","ProductId","LargeUnits","SmallUnits","Quantity","WaterSmallUnits","WaterPartialUnits","WaterQuantity","Temperature","NetQuantity","Electronic","Depth","tanksGridOptions","ng-click","setupTankRows","tanksGrid","setupTankGridColumns","target","closest","checked","useLargeUnits","quantityOnly","trackWaterLevels","useTempCorrections","calculateVolumeForTemperature","depth","calculateTankDepth","metric","quantity","getVolumeFromTankChart","tankCharts","adjustVolumeForTemperature","tempCharts","calculateWaterDepth","getWaterVolumeFromTankChart","validateTankOverShort","referenceTank","hasWarning","UseOSWarnings","HasWarning","Min","Max","InventoryTankNo","tolerance","EndQty","OSWarningPct","OSWarningUnits","totalValue","calculateTankEndQuantity","tankCommentIsRequired","tank","inventoryTankNo","tankRowValidation","errorFuelQty","warningFuelQty","maxTankVolume","getMaxVolumeFromTankChart","validateTanks","tankCommentRequiredError","refreshDataSource","PaperworkTanks","PostedPaperworkTanks","PartialUnitsList","Metric","QuantityOnly","UseLargeUnits","UseTempCorrections","TrackWaterLevels","TankCharts","TempCharts","OSComments","RequireOSComments","tanksEditable","tankCommentValidation","tankCommentErrorOnBlur","tankCommentErrorOnFocus","savePaperworkTanks","showPostedReadings","popupTitle","gridOptions","el","kendoGrid","refresh","HeaderKey","tanksForm","tankHeader","StickType","FuelStkHdrKey","NewText","getPartialValue","PaperworkDeliveriesService","$compile","deliveriesList","fuelDelivery","AuthorizedVendors","AuthorizedTerminals","AuthorizedCarriers","FuelDeliveryFreight","VendKey","TrmnlKey","CarrierKey","deliveriesLoaded","deliveryFilteredTanks","currentView","changeView","view","freightModalFormDelegate","productValidation","errorDescription","newDeliveryProduct","getDeliveriesWithContext","hideModals","FuelDeliveriesList","NewDelivery","LiftDatetime","DelivDateTime","fuelDeliveriesCount","initializeDeliveriesGrid","productEditor","SiteTankProducts","Description","tankEditor","getFilteredTanksList","ProdKey","addDeliveryGridRow","$newRow","last","deliveriesGridColIsEditable","deliveryIsEditable","getProductByKey","prodKey","deliveriesGridDS","ProdId","ProdDesc","DelivGrossQty","DelivNetQty","SelectedTank","FuelDeliveryProducts","deliveriesGridOptions","setupDeliveryRows","deliveriesGrid","addDeliveryAction","setupDeliveriesGridColumns","setupDeliveryRow","deliveryRow","selectedProduct","totalRows","$lastRow","cancelRow","AllocFuelContKey","AllocFuelContDtlKey","AllocLastPostedFuelContDtlKey","BasedOnUnits","BOLAutoMatched","BOLDtlKey","BusEntKey","CalcExtCost","CalcFrtCost","CalcUnitCost","CnfrmDateTime","CnfrmStatus","CnfrmUserID","ContractOverride","CostOverride","CostPosted","CustLocKey","DestProdKey","DestSiteKey","DestType","ExternalRecID","FrtInInventory","FrtOverride","FrtPLAmt","FrtPLInInvAmt","FrtPLInInventory","FueldelProdFrtReconGrossQty","FueldelProdFrtReconNetQty","FrtReconUserID","FrtReconciled","FrtUnitCost","FrtVndInvKey","FrtVndInvPndKey","FuelContKey","FuelContDtlKey","FuelDelKey","InvcExtCost","InvcFrtCost","InvcFrtUnitCost","InvcGrossQty","InvcNetQty","InvcUnitCost","LastPostedFuelContDtlKey","OrdQty","OrigProdKey","OwnerOption","ReconUserID","Reconciled","TaxPLAmt","TaxPLInInvAmt","VndInvKey","VndInvPndKey","FuelDeliveryTanks","DelivQty","DelProdKey","Ethanol","InventoryCost","LastCost","LastDelivGrossQty","LastDelivNetQty","LastEthanol","LastOctane","LastQty","LastRVP","LastTankNo","Octane","RplCarrierKey","RplCostAssigned","RplTrmnlKey","RplVendKey","RVP","insert","editRow","ShowGrossUnits","deleteDeliveryProductRow","dataRow","remove","newValue","oldValue","vendKey","UsesSiteAuthorizedTerminals","getSiteFuelAuthorizedOrigins","trmnlKey","terminals","savePaperworkDelivery","validateDeliveries","isNewRow","appForm","EntryUserID","paperworkDeliveryHeader","FuelDelivery","deliveryProduct","FilteredTanksList","displayDeleteConfirmationModal","deleteConfirmationModalDeferred","defer","showDeleteConfirmationModal","promise","deleteDeliveryHandler","deliveryListItem","deletePaperworkDelivery","displayCommentsModalForm","showCommentsEntryModalForm","perLoadFreightModalFormDeferred","displayPerLoadFreightModalForm","fuelDeliveryFreight","showPerLoadFreightEntryModalForm","editPerLoadFreight","productKey","SiteTanks","siteTankProductLookup","SiteTankProductLookup","findAll","ProductKey","authorizedTank","TankProductKey","isDefined","delivery","deliveryGridRowValidation","errorNetQty","warningNetQty","errorGrossQty","warningGrossQty","Capacity","showErrorTooltip","deliveriesGridRowsCount","$gridActionFooter","$gridActionFooterRowMiddle","getStatusDescription","liftDateValidation","validationMessage","validationMessageWrn","validatorError","liftDateTime","validatorWarning","warningMsg","maxDateTime","minDateTime","validateLiftDate","pdi","ng","validate","PdiValidation","deliveryDateValidation","deliveryDateTime","validateDeliveryDate","viewDelivery","deliveryKey","getDelivery","editPerLoadFreightOkHandler","executeValidationsForScope","editPerLoadFreightCancelHandler","addDeliveryFreightRow","newFreightRow","CalcAmt","FrtRuleKey","InvcAmt","Override","validateFreightRow","freight","freightRuleValidation","PaperworkDealerFormsService","dealerFormsLoaded","formsEditable","kOptions","loadDealerForms","dealerForms","DealerForms","setupDisplayValues","Updated","updateDealerForms","setFocus","AllFieldsDisplay","AllFields","newObject","property","formatNumeric","saveDealerForms","Caption","DealerFormVersion","focusSet","Rows","DisplayOnly","IsCalculated","onDealerFormChange","dataIDValue","DataIDValue","parseFloat","convertStringToNumber","CalcFields","calcField","Calcuations","calc","ResultTypeKey","TypeKey","CalcTypeKey","Operation","getReportFromSubMenu","getPaperworkReportSites","PaperworkReportSites","SubjectArea","intervalPromise","paperworkBatchKey","refreshLock","RefreshPaperworkLock","startLockInterval","stopLockInterval","cancel","pwLockListener","pwSubmitListener","currentPage","isView","menuOrder","findIndex","noKey","pathMode","ReportSettingsService","showSettingsBar","allowLoad","allowSave","allowExport","allowCsv","allowXml","allowPdf","allowExcel","exportReportData","initReportSettings","exportOptions","selectedExportOptions","saveSettingsName","showModalLoad","showModalSave","showModalConfirmSave","selectedKey","selectedReportContactKey","selectedDescription","canDelete","exportData","applyReportSettings","deleteReportSettings","saveReportSettings","getReportSettings","notify","returnedReportSettings","ReportSettings","ARWebSettings","saveSettings","loadSettings","saveConfirmReportSettings","selectKey","saveSettingsKey","fromJson","Options","apiService","deferred","apiSvcSettings","RptKey","execute","custContKey","recStatus","settingsKey","toJson","RecStatus","ReportKey","SettingsKey","executeAndNotifyOnSuccess","getTermsAndConditions","theTermsAndConditions","declineTerms","acceptTerms","agreeToTerms","acceptTermsAndConditions","CustomerWebPaymentSettings","paymentKey","invoicesGrid","invoicesGridOptions","invoicesGridInit","charge","DueDate1","create","InvoiceDate","Balance","invoicesGridDS","creditsGrid","creditsGridOptions","creditsGridInit","UnAppAmount","creditsGridDS","webPaymentLocked","paymentControlOptions","CurrentTerms","lockPayments","initializePart2","invoicesValueArr","invoiceWarning","webPayment","WebPaymentWithContext","CustomerScheduledPayment","PaymentType","InvoiceValues","selctedInvoicesValue","selctedInvoicesValueDisplay","setUpView","getPayment","lockInvoices","getScheduledPayments","HasPendingPayments","CustomerScheduledPayments","any","HasPendingBudgetPayments","selctedCreditsValue","totalInvoiceAmount","setPaymentType","lastStatementDate","LastStatementDate","isStatementCustomer","IsStatementCustomer","LastStatementAmount","HasUnpaidStatement","isBudgetCustomer","IsBudgetCustomer","isBBEnabled","IsBBEnabled","BudgetBalance","isInvoiceCustomer","IsOpenItemCustomer","Invoices","IsPrepaidCustomer","WebMinEFTDate","WebMaxEFTDate","PaymentDate","viewSetupComplete","theValue","theGrossValue","theDiscount","TermsDiscountDate","TermsDiscount","round","selctedInvoicesGrossValue","selctedInvoicesGrossValueDisplay","selctedInvoicesDiscountValue","selctedInvoicesDiscountValueDisplay","credit","selctedCreditsValueDisplay","totalInvoiceAmountDisplay","getCssClasses","ngModelController","$invalid","$dirty","$valid","showError","$error","setScheduledPaymentAmount","verifyPayment","dataItems","invoice","Credits","CreatedByCustContKey","LastModifiedByCustContKey","CustPmtAcctKey","CreditAmount","GrossAmount","DiscountAmount","CreditAmountDisplay","GrossAmountDisplay","DiscountAmountDisplay","amount","$cancelPromptToSave","paymentIsValid","elem","css","paymentDateValidation","_localStrings","liftDate","replacementParms","validatePaymentDate","invoicesLocked","delay","unlockInvoices","paymentType","checkAll","paymentsInfo","lastStmtAmt","budgetBalance","LastStatementAmountDisplay","BudgetAmountDisplay","isBudgetPayment","budgetBalanceChanged","confirmPayment","getBudgetPaymentContext","savePayment","changePayment","reCalculateCreditValues","paymentHistory","scheduled","processed","canceled","getScheduledPaymentHistoryContext","accounts","CustomerPaymentAccounts","scheduledPayments","pmntGrid","pmntGridOptions","pmntGridInit","payment","pmntGridDS","CustPmtAcctDescription","FormattedDate","StatusDescription","FormattedActivityDate","Created","predicate","reverse","cancelPaymentKey","cancelConfirm","selectedAccount","LastModifiedDateTime","FormattedCreatedDate","CreatedDateTime","CreatedByCustContEmailAddress","confirmCancelPayment","cancelPayment","lockData","Payments","lockPaymentsAndInvoices","CustomerKey","resetValues","paymentLockListener","invoiceLockListener","paymentUnlockListener","invoiceUnlockListener","$route","PaymentAccountService","acctGrid","acctGridOptions","acctGridInit","acctGridDS","WebPaymentAccounts","AccountStatusDesc","NextPaymentText","getPaymentAccountList","AccountLastActivity","FormattedPaymentDate","AccountNextPayment","AccountNextPaymentAmmount","editableAccount","paymentAccountKey","initializeEditAcount","AccountTypes","descr","WebPaymentAccount","AccountStatus","getPaymentAccount","AccountTypeDescr","AccountType","CustomerPaymentAccount","routingNumberIsValid","setAccountStatus","savePaymentAccount","verifyPaymentAccount","validateRoutingNumber","BankRoutingNo","verifyPaymentAccountOverride","routingNumberValidation","confirmDeactivate","confirmClose","no","acctInfo","confirmPaymentAccount","changePaymentAccount","AccountNoVerify","AccountNo","verifyAccount","webPaymentAccountKey","webPaymentAccountDesc","amt1","amount1","amt2","amount2","VerificationAmount1","VerificationAmount2","contactsGrid","contactsGridOptions","selectedRows","contactsGridInit","contactsGridDS","CustomerContacts","WebActive","ManageContactsAndSecurity","listContacts","FirstName","LastName","expandWFGrids","expand","showAccountFNs","showFuelFNs","showOrdersFNs","showPaperworkFNs","showCustomPagesFNs","wbfns","Disabled","textMessagePhoneNumbers","modalMultiSave","modalCopySecurity","copyContact","clearSecurity","modalResetPassword","verify","modalChangeEmail","hash","email","pendingSave","phoneTypes","clearButton","canResetPassword","EnforcePasswordComplexity","getNextPasswordResetDate","hideActiveCheckbox","hideWebActiveControl","contactKey","customerContactKey","editWebUser","AnswerClear2","copyUser","CopyContacts","loadContactContext","WebQuestionAnswer2","WebQuestionAnswer","TextAddressPhone","setAllWebFunctions","editUserForm","wbFns","saveContact","secretQuestion","$angular_scope","scopeValidationErrors","MatchingContactCount","saveContactOnly","ApplyToAll","save","saveAllContacts","EditorName","EditorEmailAddress","PhoneFormatted","Phone","AltPhoneFormatted","AltPhone","AltPhone2Formatted","AltPhone2","FAXFormatted","FAX","saveWebUser","reload","retrieveWebUserData","ID","setEditUserSelectedAuthorization","updateContactSecurity","currentContactWebFunctions","questionChanged","showChangeEmailModal","hideChangeEmailModal","saveChangeEmail","addUser","copyContacts","getBlankContact","createContact","validationsPassed","closeAddUser","customerService","contacts","primaryCreditContact","sendBalanceAlerts","SendBalanceAlerts","sendBalanceAlertText","balanceAlertThreshold","BalanceAlertThreshold","prepaidBalance","CrPrePaidBalance","balanceAlertThresholdDisplay","CreditContKey","num","saveAccountSettings","saveCustomerAccountSettings","settingsForm","currentCustomerId","auditLog","auditResults","auditLogGrid","auditLogGridOptions","auditLogGridInit","sideMenuLocation","includeAdds","includeChanges","includeDeletes","includeActions","subjectArea","changedBy","showContacts","subjectAreas","contactList","sortBy","unique","add","getWebAudits","WebAuditEntries","AudEntryDateTime","AccountActivity","invoices","reportTypeDetail","outstandingOnly","showReportDetail","getCustomerLocations","locations","Locations","Active","unshift","transactionHistory","creditCardActivity","groupByDate","pending","setReport","tenNinetyNine","useDateRange","AccountReports","recentActivity","AccountPayments","unappliedPayments","FuelCardsService","viewCards","modalEdit","modalPin","modalReissue","modalDeactivate","modalChangeCardNo","viewCardsGrid","viewCardsGridOptions","displayFuelCard","viewCardsGridInit","viewCardsGridDS","cards","getCards","cardFormat","cardNumber","active","expired","locked","cancelled","department","Cards","NumberMasked","Template","statusCodes","act","ActivationDate","exp","ExpirationDate","Sort","FuelCardsCards","FuelCardsTrans","FuelCardsPrices","stringFromCharacterEntity","getCardsContext","formats","CardFormats","embossingReasons","CardEmbossingReasons","deactivateReasons","CardDeactivationReasons","states","States","alertRules","CardAlertRules","CustomerCardTemplates","company","Company","getCardsDepartments","departments","Departments","saveCards","state","closeModal","card","cardDetails","CardInfos","Number_Formatted","Number_Masked","isValidForWebTemplate","PIN","Activation_Date","Expiration_Date","Cards_Issued","Emboss_Date","Emboss_Line_1","Emboss_Line_2","Emboss_Line_3","Export_To_Embosser","Marked_For_Export","Last_Emboss_Date","CardDeactRsn_Key","Deactivation_Date","HasTransactions","TimeStamp","securityOptions","allowPending","CardCFs","editCards","getCardDetails","ViewCardNumbers","CardDetails","origCardDetails","setSecurityOptions","displayModelPin","saveChangesPrompt","PIN1","PIN2","displayModelReissue","CardEmbRsn_Key","displayModelDeactReasons","toISOString","displayChangeCardNo","command","nextDate","CardFmt_Key","VisibleOnWeb","PhysicalCard","AutoNo","AllowPending","UseExpirationDates","DefaultLifetimeSelection","AllowDefaultByCustomer","Next_Exp_Date","keyLookup","list","isArray","readOnly","formTitle","viewCardNumber","displayCardNumber","canChangeCardNo","showVehicleInfo","showCardAuths","showProdSite","showTaxExemeptions","showEmbossingAlert","showChangePin","showReissue","reissueTitle","showDeactivate","showSaveTemplate","shipToLocation","cardType","cardStatus","deactivationReason","embossingReason","alertRule","EditCards","AllowEditAfterEmbossed","autoNo","maxCardNoLength","Mask","CardAlertRule_Key","Max_Trans_PerDay","AllowVehicleInfo","Auth_By_Product","Single_Site_Auth_Site_Key","CardTaxExs","showSave","AllowPIN","AddNewCards","CardDptKey","Vehicle_State_Key","cols","addFooterBar","addCardAction","stateList","kendoDropDownList","optionLabel","Code","addCardsGridOptions","nullable","validation","number","matches","addCardsGrid","vehicleID","licenseNo","defaultValue","update","destroy","createAt","messages","commands","canceledit","mobile","table","getAttribute","addRow","preventDefault","showCardNo","showPIN","showVehInfo","validateTemplates","templateKey","templateDropDown","saveChanges","templateDetails","clone","newCard","Cust_Key","SetExpirationDate","VehicleID","Vehicle_License_No","CardFmt_Allow_Pending","addCard","CardNumberValid","getCard","splice","myItem","AutoNoKey","locationsGrid","locationsGridOptions","selectLocation","locationsGridInit","locationsGridDS","results","selected","disableCtrls","LocIDFormat","LocIDLength","canAddorSave","ViewCards","pullLocations","addLocation","clearLocation","blankLocation","deleteLocation","pushLocation","saveLocation","loc","StateKey","State","saveCustomerLocations","locationsForm","updatePhone","departmentsGridReady","departmentsGrid","departmentsGridOptions","selectRow","deptKey","departmentsGridInit","departmentsGridDS","tableArray","html","FieldName","values","selDept","selVals","disableControls","pullDepartments","createObjects","hideCol1","hideCol2","hideCol3","hideCol4","hideCol5","Fields","Values","FieldNumber","CardDptFldKey","FieldValue","dept","makeTable","loadTable","deleteDept","pushDepartments","departmentForm","newDesc","saveCardsDepartments","n","cell2","cell4","deptName","cell1","cell1Key","cell1Value","cell2Key","cell2Value","cell3","cell3Key","cell3Value","cell4Key","cell4Value","cell5","cell5Key","cell5Value","formDisabled","pullFields","setFields","clickCancel","clickSave","pushFields","deptSetupForm","transactionAlerts","CardTransactions","transactionDetails","cardNoDesc","inclUnbilled","inclBilled","groupBy","inclAdditionalInfo","viewCardNumbers","additionalInfoReportName","rptName","CPInvcRecapSumTaxesByInvcGrp","updateOptions","transactionSummary","invoiceNo","enableUnbilled","enableBilled","recap1","recap2","transactionByInvoice","getTaxAuthorities","taxAuthorities","TaxAuthorities","taxDetails","taxAuthKey","groupBy1","enableGroupBy1None","groupBy2","enableGroupBy2","groupBy3","enableGroupBy3","inclTransDetail","enableInclAdditionalInfo","taxSummary","transactionsAlerts","reportCount","refreshTransactionAlerts","transactionTaxRecap","showTaxRecap","CPPriceNotices","lookupPrices","product","sites","CustContCPSite_Site_Key","Site_Description","products","ProdAliasGrp_Key","ProdAliasGrp_Description","maxCPDays","getPriceNoticesSettings","CPPrcNtcRuleKey","PriceNoticesSettingsSites","concat","Site_Selected","PriceNoticesSettingsGroups","ProdAliasGrp_Selected","CPPriceRuleMaxDays","productsGrid","productsGridOptions","sitesGrid","sitesGridOptions","siteSearchGrid","siteSearchGridOptions","siteSearchGridInit","siteSearchGridDS","sitesGridInit","sitesGridDS","Site_Address1","Site_City","State_Code","Site_Zip","productsGridInit","productsGridDS","initPriceNoticesSettings","initModalSiteSelector","priceNoticesSettings","methods","allProducts","CustContCPProd_Key","CustContCPProd_CustCont_Key","ProdAliasGrp_ID","ts","refreshPriceNoticesSettings","PriceNoticesSettingsMethods","CompKey","modalSiteSelector","siteSearch","city","postal","limit","toManyResults","maxResults","showModalSiteSelector","retrieveSites","getSearchSites","SearchSites","checkAllProducts","disableNotices","EmailSelected","AltEmailSelected","PhoneTextSelected","addSites","CustContCPSite_Key","removeSite","savePriceNoticeSettings","hasProducts","hasSites","statementsGrid","statementsGridOptions","StmtEdocKey","statementsGridInit","statementsGridDS","getStatements","stmt","StmtDateTime","notifications","types","fullName","notificationsGrid","notificationsGridOptions","handleRowClick","notificationsGridInit","notificationsGridDS","getNotifications","note","NotcDate","EmailBody","trustAsHtml","NotcType","tenNinetyNineAdvice","yearsBack","adviceGrid","adviceGridOptions","Get1099AdviceList","DateTimeFormatted","DateTime","PmtYear","adviceGridInit","adviceGridDS","bulkFuelPriceNoticesService","bulkPricesGrid","bulkPricesGridOptions","bulkPricesGridInit","bulkPricesGridDS","bulkFuelPrices","loadBulkFuelPrices","EffDateTimeFormatted","EffDateTime","warehousePriceNoticesService","warehousePricesGrid","warehousePricesGridOptions","warehousePricesGridInit","warehousePricesGridDS","warehousePrices","loadWarehousePrices","canOpenAddOrders","CanAddEditWebOrders","ordersService","errorsDisplayed","enableButton","removeAttr","setButtonVisiblity","displayOrders","orderDetails","OrdStatusKey","reopenBtn","submitBtn","WOGSettings","SubmitOnHold","cancelBtn","hasAnyItems","keyProperty","tanksAndEquipment","addOrder","tankIDCol","cancelCommentModal","blankOrderHeaderObj","creditHoldMessage","getOrdersContext","buttonBar","PONumber","DeliveryDT","ordKey","getOrderDetails","OrderDetails","getLocationDetails","getOrderLocationInfo","ReqDelivDateTime","TanksAndEquipment","OrdDelivDirections","DeliveryDirections","equipment","TankNumber","OrderQty","EquipmentKey","hasAnyTanks","hasAnyEquipment","saveOrder","Command","OrdCreatedByContKey","saveOrderDetails","OrdKey","cancelCommentModalDialogClose","editOrders","shipTo","prevCustLocKey","hideTankAndEquipment","ordersGrid","ordersGridOptions","ordersEquipmentGridOptions","ordersGridInit","showIdCol","ordersGridDS","TankID","Product","capacity","is","rowData","getKendoNumericTextBox","MaxVolume","rowDataMaxVolume","showColumn","ordersEquipmentGridInit","ordersEquipmentGridDS","EquipmentID","EquipmentDescription","ordersEquipmentGrid","validateOrderDate","savedTankData","dataBetweenDateChanges","getOrderContext","getOrderCustomerLocations","MinDateTime","OrderLocations","HasValidTankOrEquipment","updateCustomerLocationData","l","loadExistingOrder","initialOrderCustLocKey","validOrderQtys","items","map","order","isInteger","qtyValidityStates","every","Boolean","isFinite","floor","orderQtyWarning","orderTotal","sum","OrdQtyParams","OrdMinQty","OrdMaxQty","validOrder","editForm","updateCustomerLocationDataLock","source","validTankOrEquipment","isEmpty","finalItems","s","existing","CustFuelTankKey","copyTankData","te","OrderEquipmentDetails","copyEquipmentData","t","p","blankOrderDetailsObj","all","requestedDT","suggestedDT","theWinner","temp","reqDelivDateTimeString","oldReqDelivDateTimeString","isString","oldReqDelivDateTime","reqDelivDateTime","toDateString","openOrders","DeliveryDate","getOpenOrders","OpenOrders","openOrder","orders","ViewOrderHistoryandPriceNotices","quotes","ordered","dispatched","delivered","billed","fuel","warehouse","noninventory","productSearchText","packageSearchText","orderInvoiceBOLSearchTerm","post","Content-Type","service","NotificationService","webAPICall","notifyOnSuccess","suppressErrors","assign","handleSuccess","handleFailure","catch","handleError","executeAndNotifyOnSuccessAndSuppressErrors","executeAndSuppressErrors","All","BulkFuel","CardLock","Retail","Wholesale","CardAlerts","ViewNotificationsSenttoOtherContacts","AddAndEditBulkFuelOrders","Account","Orders","Paperwork","FuelCards","Comments","Documents","AccountAlerts","CustomPages","webFunction","customer","handle","HttpUtil","paymentInfo","sessionTimeout","$analytics","WebUserId","WebUserPassword","ImpersonationGuid","ImpersonatedUserId","ImpersonatedKey","ImpersonatedType","ImpersonatorUserId","ImpersonatorKey","ImpersonatorType","eventTrack","category","label","removeEmptySiteMenuEntries","WebUser","retrieveWebUserFromAPI","retrieveWebUserFromAPIWithToken","ProfileKey","retrieveSelectedProfileFromAPI","webUserId","quiet","isLogin","WebUserKey","IsLogin","date1_ms","PWCreatedDate","date2_ms","_token","_profile","closeDialog","closeText","autoClose","transclude","$eval","dialogStyle","$element","$attrs","hideModal","ngModelCtrl","transformedInput","$setViewValue","$render","ele","dynamic","contents","NUMBER_REGEXP","lastValidValue","precision","symbol","unFormatNumber","formatViewValue","decimalPlaces","$isEmpty","nStr","split","x1","x2","rgx","test","addCommas","toFixed","applyFormat","$modelValue","$viewValue","empty","$setValidity","bind","customAutofocus","at","tip","corner","$parse","passwordMeterScore","pwdValidLength","pwdHasLetter","pwdHasNumber","pwdHasSpecial","PasswordMinLength","PasswordMinUpperCase","PasswordMinNumbers","score","total","$pristine","currentValue","imageArray","stop","advance","slider","getPrevImage","pauseAutoAdvance","getNextImage","modelCtrl","inputValue","alphaNumeric","initializeWindowSize","maxHeight","body","scrollHeight","documentElement","offsetHeight","clientHeight","windowHeight","windowWidth","innerWidth","newHeight","oldHeight","replaceWith","onCloseFn","onCloseMessage","onbeforeunload","onLeaveIfFn","onLeaveMessage","$locationChangeStartUnbind","localizedString","confirmPopUpText","pnLocalizationCtrl","localizations","overlayContainer","mainContent","getElementsByClassName","setHeight","postRender","terminal","kendoDateFormat","formatForCulture","kendoTimeFormat","kendoDateTimeFormat","inputMaskDateFormat","inputMaskTimeFormat","inputMaskDateTimeFormat","dateFormat","timeFormat","dateTimeFormat","dateTimeFormatPatterns","ntbCtrl","widgetInstance","ui","inputmask","clearMaskOnLostFocus","toBoolean","v","$$lowercase","String","theString","arguments","regEx","RegExp","validatorParms","executionExplicit","processElementErrorNotification","validationAttr","hasError","propertyName","validationValidationMsg","kendoDropDwnElm","errFocusHdlr","errBlurHdlr","errClickHdlr","ngModel","join","toggle","currentElement","span","unbind","processElementWarningNotification","wrnFocusHdlr","wrnBlurHdlr","kendoDropDwnElm1","processValidationNotification","compile","output","validationErr","viewport","my","collision","screen","fixed","scopeValidationWarnings","validationWrn","processValidationsSummaryNotification","createElementValidationMessageError","validationMsg","validationMessageElement","clearBtnElm","siblings","after","createElementValidationMessageWarning","removeElementValidationMessage","$this","requiredMsgDefault","minLengthMsgDefault","maxLengthMsgDefault","valueRuleRngMsgDefault","valueRuleGtMsgDefault","valueRuleLtMsgDefault","pdiRequiredExecutionExplicitDefault","ptrnEmailMsgDefault","pdiMinLengthExecutionExplicitDefault","pdiMaxLengthExecutionExplicitDefault","pdiMaxLengthEnforceMaxConstraintDefault","pdiValueRuleRangeExecutionExplicitDefault","pdiValueRuleGreaterThanExecutionExplicitDefault","pdiValueRuleLessThanExecutionExplicitDefault","pdiEmailValidataionExecutionExplicitDefault","evaluateIfConditions","ifExpr","account","AccountNoMasked","PrenoteDate","RejectedEmailSent","VerificationDate","IsDefault","AccountNextPaymentKey","ScheduledPaymentCount","cs","$$childHead","$$nextSibling","scopeValidations","hadError","validatorResult","validator","validateErrors","validateWarnings","warnings","formModelWatchers","addScope","scopeID","$id","pdivalidation","pdiValidations","elementValue","expression","isObject","isFunction","priority","validations","addValidation","showValidationNotification","ctrlIndex","errorValidatorFn","warningValidatorFn","validationErrorMsg","validationWarningMsg","formModel","newScope","$new","appHtml","addFormModelWatcher","watchUnBinder","unBinderFn","ctrls","requiredValidationMsg","requiredValidationMsgWrn","requiredExecutionExplicit","requiredIfExpr","requiredIfExprWrn","minlengthValidationMsg","minlengthValidationMsgWrn","minlengthExecutionExplicit","pdiMinlength","minlengthIfExpr","minlengthIfExprWrn","ifConditions","maxlengthValidationMsg","maxlengthValidationMsgWrn","enforceMaxConstraint","enforcemaxconstraint","maxlengthIfExpr","pdiMaxlength","maxlengthExecutionExplicit","lowerLimit","upperLimit","valueRuleRngValidationMsg","valueRuleRngValidationMsgWrn","valueruleRngValidationMsg","valueruleRngValidationMsgWrn","rangeParms","pdiValueruleRange","valueruleRngExecutionExplicit","valueruleRngIfExpr","valueruleRngIfExprWrn","valueruleGtValidationMsg","valueruleGtValidationMsgWrn","valueruleGtExecutionExplicit","pdiValueruleGreaterthan","valueruleGtIfExpr","valueruleGtIfExprWrn","valueruleLtValidationMsg","valueruleLtValidationMsgWrn","valueruleLtExecutionExplicit","pdiValueruleLessthan","valueruleLtIfExpr","valueruleLtIfExprWrn","ptrnValidationMsg","pdiValueIsNumeric","pdiValueIsNumericMsg","pdiDateIsGreaterEqualToMsg","pdiDateIsGreaterEqualToMsgWrn","fromDate","pdiDateIsGreaterEqualToFromDate","thruDate","ptrnValidationMsgWrn","regExPattern","ptrnEmailValidationMsg","ptrnEmailValidationMsgWrn","prtnEmailExecutionExplicit","emails","matchElementValidationMsg","matchElementValidationMsgWrn","valueruleNgModelMatch","valueruleMatchElementValidationMsg","valueruleMatchElementValidationMsgWrn","valueruleMatchElementIfExpr","valueruleMatchElementIfExprWrn","tel","country","provider","$get","templateName","absurl","protocol","hostname","pathname","indexOfAppRel","toLowerCase","substring","userAgent","navigator","browsers","chrome","safari","firefox","ie","custLocKey","StartDate","EndDate","alertAmount","sendAlerts","executeAndNotify","PrimaryContactKey","AlertAmount","locType","LocationType","Location","custkey","beginDate","BeginDate","customerKey","ReferenceNumber","DocumentType","ContactKey","documetnList","cust","yb","YearsBack","EdocKey","parameters","Parameters","MimeType","blob","bytes","EdocStream","raw","atob","uint8Array","Uint8Array","charCodeAt","Blob","createBlob","file","createObjectURL","setDatesToNull","cardNumDesc","isActive","isExpired","isPending","isLocked","isCancelled","CardFormatKey","CardNumDesc","IsActive","IsExpired","IsPending","IsLocked","IsCancelled","Department","cardKey","canViewCardNumbers","CardKey","CanViewCardNumbers","compKey","CompanyKey","cardCF","Card","CardCF","getLookupPrices","daysBack","DaysBack","cpPriceNoticeRuleKey","CPPriceRuleKey","City","Zip","Limit","groups","Address1","Address2","County","PostalCode","Email","depts","vals","locale","language","toLocaleString","currency","dateString","_cachedLocalizations","setLocalizations","localizationFilesContainer","innerText","string","getStringFrom","r","doesNotExist","getCachedLocalizationsFor","rp","constructor","Array","replaceString","fromCharCode","str","localizationSvcFactory","moduleName","self","$onInit","requestedDeliveryDate","RequestedDeliveryDate","Comment","CustContName","CustContPhone","CustLocAddress","CustLocCity","CustLocDesc","CustLocState","CustLocZip","LangID","OrdDelivNotes","OrdNumber","OrdStatus","OrdType","OrdFuelKey","localCache","Cache","object","expiration","now","inserted","nodeKey","ignoreStatus","IgnoreStatus","siteKey","Unposted","PaperworkBatches","emailAddress","BatchKey","ReadOnly","batchKey","readonly","forEntry","ForEntry","RefreshLock","DealerFormsHeader","forViewOnly","vendorKey","deliveryHeader","DeliveryHeader","calculateNet","begin","diff","nMax","profitcenterKey","ProfitCenterKey","netUnits","rtlPrice","checkRetailPrice","checkAveragePrice","showRtlPrice","netAmounts","totalDollar","meterHeaders","PaperworkMeterHeader","reportName","ReportName","convertVolumeToSiteUnits","units","siteUOM","tankUOM","getVolume","UnitOfMeasure","MeasurementType","tankChart","TankTypeKey","convertLinearUnits","wholeNumber","decimalNumber","baseAmount","partialAmount","Volume","isMetric","WaterDepth","TmpChartKey","temperature","tempChart","conversionFactor","ConvFactor","qty","wQty","TmpChartUseNetQty","tankHeaders","PaperworkTankHeader","customerPaymentAccountKey","webPaymentAccount","routingNumber","webPaymentKey","WebPaymentKey","accountKey","AccountKey","Scheduled","Canceled","Processed","skipBroadcast","CmdSuccess","termsKey","LegalTermKey","getARCustWebSheet","styleSheets","setLandingColor","pcolor","landingClasses","profileClasses","resetStyle","cssOverrideStyle","attribute","classNames","pdiSheet","rules","cssRules","selectorText","ArWebProfile","WebProfileKey","retrieveWebProfileFromAPI","webProfileWithContext","WebProfileWithContext","sCfg","iniializeFromApi","LandingPrimaryColor","Timeout","webProfileKey","messageType","MessageType","ca","WebProfileMessage","retrieveWebProfileMessageFromAPI","includeEvents","nameEmail","IncludeAdds","IncludeChanges","IncludeDeletes","IncludeEvents","NameEmail","MaxRows","renderReportApi","ReportBytes","documentMode","msSaveBlob","Filename","blobUrl","filename","createElement","click","href","download","appendChild","parentNode","removeChild","top","padCharacter","revokeObjectURL","AltEmailAddress","AltExt","AltExt2","AltPhone2Type","AltPhoneType","AltSpdDial","AltSpdDial2","CnSalKey","CPPrcNtcAllProducts","CPPrcNtcChgByDateTime","CPPrcNtcChgByUser","CPPrcNtcSignupDateTime","CPPrcNtcSignupUser","CreatedBy","EmailAddressOrig","Ext","FAXExt","FAXSpdDial","FaxPrefix","Greeting","LastChgBy","Notes","PhoneType","ReceiveMarketingLetters","SpdDial","TextAddressTextMsgDomKey","Title","WebMustChgPwd","WebPWAccessSingleSite","WebPWAccessSiteKey","WebPwd","WebQuestionType","CustomerContactWebAlerts","ConfirmEmail","customerContact"],"mappings":"AAIAA,QAAAC,OAAA,cAAA,CACA,iBACA,mBACA,yBACA,UACA,YACA,cACA,UACA,WACA,SACA,UACA,mBACA,oBACA,mBACA,oBACA,0BACA,WACA,cACA,cACA,cACA,eACA,iBACA,mBACA,UACA,kBACA,eACA,aACA,iBACA,aACA,eACA,gBACA,mBACA,gCACA,mBACA,qBACA,qBACA,qBACA,gBACA,0BACA,kBACA,qBACA,2BACA,0BACA,+BACA,gCACA,4BACA,oBACA,2BACA,wBACA,iCACA,sBACA,qBACA,iBACA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oBAAA,SAAA9hE,QAAAoH,UAAAG,gBACA,IAAAqoC,SAAAv5C,GAAAwvC,QACAgK,eAAA,IAAA/jC,mBACA,CACAE,OAAA,OACA5S,IAAA,mCACA3B,KAAA,CACA8I,QAAAP,QACAmiF,UAAA/6E,UACAg7E,QAAA76E,kBASA,OALAooC,WAAAI,QAAAF,gBAAAj0C,KACA,SAAAnE,MACAm4C,SAAAh6C,QAAA6B,KAAAoV,QAGA+iC,SAAA7J","file":"ARCustWeb.min.js","sourcesContent":["/**\r\n * Created by rhampton on 3/6/14.\r\n */\r\n\r\nangular.module('petronetApp', [\r\n 'core.providers',\r\n 'kendo.directives',\r\n 'services.localizations',\r\n 'ngRoute',\r\n 'ngAnimate',\r\n 'pnContactUs',\r\n 'pnLogin',\r\n 'pnHeader',\r\n 'pnHome',\r\n 'pnAdmin',\r\n 'pnAccountReports',\r\n 'pnAccountPayments',\r\n 'pnFuelCardsCards',\r\n 'pnFuelCardsPrices',\r\n 'pnFuelCardsTransactions',\r\n 'pnOrders',\r\n 'pnODPricing',\r\n 'pnPaperwork',\r\n 'pnDocuments',\r\n 'pnDocAccount',\r\n 'pnDateSelector',\r\n 'pnReportSettings',\r\n 'pnPages',\r\n 'core.directives',\r\n 'core.filters',\r\n 'core.enums',\r\n 'core.constants',\r\n 'core.error',\r\n 'core.objects',\r\n 'core.security',\r\n 'services.browser',\r\n 'services.bulkFuelPriceNotices',\r\n 'services.encrypt',\r\n 'services.FuelCards',\r\n 'services.contactUs',\r\n 'services.documents',\r\n 'services.home',\r\n 'services.globalizations',\r\n 'services.orders',\r\n 'services.paperwork',\r\n 'services.paperworkMeters',\r\n 'services.paperworkTanks',\r\n 'services.paperworkDeliveries',\r\n 'services.paperworkDealerForms',\r\n 'services.paperworkReports',\r\n 'services.payments',\r\n 'services.paymentAccounts',\r\n 'services.userAccounts',\r\n 'services.warehousePriceNotices',\r\n 'services.WebProfile',\r\n 'services.customers',\r\n 'services.pages',\r\n 'services.logging',\r\n 'services.reporting',\r\n 'services.edoc',\r\n 'pdi.validate',\r\n 'pdi.extensions',\r\n 'angulartics',\r\n 'angulartics.google.analytics'\r\n])\r\n .config(function ($routeProvider, $httpProvider, $locationProvider, templateProvider)\r\n {\r\n // as of angularjs 1.6.0 they append ! to hashbang urls which causes undesired behavior\r\n // reset that functionlity by adding this hashPrefix change\r\n $locationProvider.hashPrefix('');\r\n\r\n $routeProvider\r\n .when(\"/\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"LogIn\"),\r\n controller: 'loginCtrl',\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"LoginLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Alerts/BalanceAlertSettings\",\r\n {\r\n templateUrl: \"account/alerts/balanceAlertSettings/balanceAlertSettings.tpl.html\",\r\n controller: \"VerifyPaymentCtrl\"\r\n }\r\n )\r\n .otherwise({\r\n templateUrl: templateProvider.getTemplate(\"Home\"),\r\n controller: \"homeCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"HomeLocalization\");\r\n }\r\n }\r\n });\r\n\r\n // Add our custom Interceptors\r\n $httpProvider.interceptors.push('httpInterceptor');\r\n $httpProvider.interceptors.push('AuthInterceptor');\r\n\r\n // For backwards compatibility to old browsers, set this to false\r\n //$locationProvider.html5Mode(false).hashPrefix('!');\r\n })\r\n .factory('httpInterceptor', function ($rootScope, $q, $injector, localizationSvc)\r\n {\r\n\r\n return {\r\n\r\n request: function (config)\r\n {\r\n\r\n config.headers = config.headers || {};\r\n\r\n\r\n if ($rootScope.loginInfo && $rootScope.loginInfo.userIsImpersonated) {\r\n config.headers['customerweb-user-id'] = $rootScope.loginInfo.userId;\r\n config.headers['customerweb-user-key'] = $rootScope.loginInfo.userKey;\r\n config.headers['customerweb-user-type'] = $rootScope.loginInfo.userType;\r\n config.headers['customerweb-impersonator-id'] = $rootScope.loginInfo.impersonatorUserId;\r\n config.headers['customerweb-impersonator-key'] = $rootScope.loginInfo.impersonatorUserKey;\r\n config.headers['customerweb-impersonator-type'] = $rootScope.loginInfo.impersonatorUserType;\r\n }\r\n\r\n // Show our ajax spinner\r\n $rootScope.showLoader = true;\r\n\r\n return config || $q.when(config);\r\n },\r\n\r\n response: function (response)\r\n {\r\n\r\n var $http = $http || $injector.get('$http');\r\n\r\n // If all the pending http requests are done or\r\n // the user is not authenticated\r\n if ($http.pendingRequests.length < 1 || $rootScope.isAuthenticated === false)\r\n {\r\n // Hide the ajax spinner\r\n $rootScope.showLoader = false;\r\n }\r\n\r\n return response || $q.when(response);\r\n\r\n },\r\n\r\n responseError: function (response)\r\n {\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"AppLocalization\");\r\n switch (response.status)\r\n {\r\n case 500:\r\n if (response.data.ExceptionMessage && response.data.ExceptionMessage.match(\"UNIQUE KEY constraint\"))\r\n {\r\n if (response.data.ExceptionMessage.match(\"AR_Web_Settings\"))\r\n $rootScope.notifier.show('' + localStrings.getLocalizedString(\"SaveFailed\") + '
' + localStrings.getLocalizedString(\"UniqueNameRequired\"), 'error');\r\n else\r\n $rootScope.notifier.show('' + localStrings.getLocalizedString(\"SaveFailed\") + '
' + localStrings.getLocalizedString(\"CannotInsertDuplicate\"), 'error');\r\n }\r\n\r\n if (response.data.ExceptionMessage && response.data.ExceptionMessage.match(\"Timeout expired\"))\r\n {\r\n $rootScope.notifier.show(localStrings.getLocalizedString(\"ConnectionTimedOut\"), 'error');\r\n }\r\n }\r\n\r\n // An error has occurred, hide the ajax spinner\r\n $rootScope.showLoader = false;\r\n\r\n return $q.reject(response);\r\n\r\n }\r\n\r\n };\r\n\r\n })\r\n .controller(\"indexCtrl\", function ($scope, $http, $q, $rootScope, Authentication, WebUserSvc, $location,\r\n WebFunctionGroups, WebFunctions, $window, BrowserService, WebProfileService, $timeout, $filter, encryptData,\r\n WebFunctionModules, PaymentService, PaperworkService, localizationSvc, LoggingService, EdocService)\r\n {\r\n 'use strict';\r\n\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"AppLocalization\");\r\n var localDateRangeStrings = localizationSvc.getCachedLocalizationsContainer(\"DateSelectorLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n $scope.appInfo = $scope.appInfo || {\r\n profile: {},\r\n webUser: {},\r\n paperwork: {},\r\n fuelCards: {},\r\n userLoaded: false,\r\n profileKey: -1,\r\n customText: \"\",\r\n backgroundImage: {},\r\n syscfg: {}\r\n };\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($rootScope.loginInfo))\r\n {\r\n $rootScope.loginInfo = {};\r\n $rootScope.loginInfo.userId = \"\";\r\n $rootScope.loginInfo.password = \"\";\r\n $rootScope.loginInfo.userKey = -1;\r\n $rootScope.loginInfo.userType = 1;\r\n $rootScope.loginInfo.userIsImpersonated = false;\r\n $rootScope.loginInfo.impersonatorUserId = \"\";\r\n $rootScope.loginInfo.impersonatorUserKey = -1;\r\n $rootScope.loginInfo.impersonatorUserType = 0;\r\n $rootScope.loginInfo.impersonationAccessGuid = undefined;\r\n\r\n }\r\n\r\n if ($location.path().search(/(SignUp|ResetPassword|unsubscribe|SiteDisabled)/i) === -1)\r\n {\r\n if ($location.path().indexOf(\"SetPassword\") >= 0)\r\n {\r\n\r\n $scope.applySystemSettings();\r\n\r\n }\r\n else if (!$scope.appInfo.userLoaded || $scope.appInfo.webUser === undefined)\r\n {\r\n if (WebUserSvc.getLoggedInWebUserToken() === undefined)\r\n $scope.logout();\r\n }\r\n }\r\n };\r\n\r\n $scope.getAuthenticationToken = function ()\r\n {\r\n return Authentication.userToken();\r\n };\r\n\r\n $scope.logout = function ()\r\n {\r\n $rootScope.sessionExpired = false;\r\n $scope.clearInfo();\r\n $scope.goTo('/');\r\n };\r\n\r\n $scope.clearInfo = function ()\r\n {\r\n amplify.store(\"pnuser-token\", null);\r\n amplify.store(\"pnprofile\", null);\r\n amplify.store(\"pnWebProfile\", null);\r\n amplify.store(\"pnAuthIndex\", null);\r\n $rootScope.isAuthenticated = false;\r\n $rootScope.loginInfo = {};\r\n $rootScope.loginInfo.userId = \"\";\r\n $rootScope.loginInfo.password = \"\";\r\n $rootScope.loginInfo.rememberMe = false;\r\n $scope.locationInfo = {};\r\n $scope.appInfo = {};\r\n };\r\n\r\n $scope.functionGroup = WebFunctionGroups;\r\n $scope.webFunctions = WebFunctions;\r\n $scope.locationInfo = {\r\n menuLocation: 0,\r\n subMenuLocation: -1,\r\n sideMenu: \"\",\r\n sideMenuData: {}\r\n };\r\n\r\n //default actions for side menu apply buttons\r\n $scope.applyAction = function ()\r\n {\r\n //todo: set error condition indicating there is no assigned action\r\n };\r\n\r\n\r\n $scope.applySystemSettings = function ()\r\n {\r\n WebProfileService.initialize().then(function (data)\r\n {\r\n $scope.appInfo.syscfg = data.Configuration;\r\n $scope.appInfo.softwareVersion = data.SoftwareVersion;\r\n $scope.appInfo.ContactUsText = data.ContactUsText;\r\n $scope.appInfo.poweredByPdiText = data.PoweredByPdiText;\r\n $scope.appInfo.countryInfo = data.Country;\r\n $scope.appInfo.passwordComplexity = data.PasswordComplexity;\r\n\r\n if (!$scope.appInfo.userLoaded)\r\n {\r\n $scope.appInfo.LandingLogoImage = data.LandingLogoImage;\r\n $scope.appInfo.backgroundImage = data.LandingBannerImage;\r\n }\r\n\r\n if ($scope.appInfo.syscfg.UseGoogleAnalytics === 'True' && !$scope.appInfo.syscfg.GoogleAnalyticsKey.isBlank())\r\n {\r\n ga('create', $scope.appInfo.syscfg.GoogleAnalyticsKey, 'auto'); // 'none' while you are working on localhost else 'auto'\r\n }\r\n });\r\n };\r\n\r\n $scope.applySystemSettingsSiteDisabled = function ()\r\n {\r\n WebProfileService.initializeSiteDisabled().then(function (data)\r\n {\r\n $scope.appInfo.syscfg = data.Configuration;\r\n $scope.appInfo.softwareVersion = data.SoftwareVersion;\r\n $scope.appInfo.poweredByPdiText = data.PoweredByPdiText;\r\n $scope.appInfo.countryInfo = data.Country;\r\n $scope.appInfo.passwordComplexity = data.PasswordComplexity;\r\n if (!$scope.appInfo.userLoaded)\r\n {\r\n $scope.appInfo.LandingLogoImage = data.LandingLogoImage;\r\n $scope.appInfo.backgroundImage = data.LandingBannerImage;\r\n }\r\n\r\n });\r\n };\r\n\r\n $scope.applySelectedProfile = function () {\r\n $scope.appInfo.webUser = WebUserSvc.getWebUser();\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser)) {\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser.CurrentWebProfile)) {\r\n $scope.appInfo.profile = $scope.appInfo.webUser.CurrentWebProfile;\r\n $scope.appInfo.profileKey = $scope.appInfo.webUser.CurrentWebProfile.Key;\r\n WebProfileService.setProfileColor($scope.appInfo.webUser.CurrentWebProfile.PrimaryColor);\r\n }\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo.authorizationIndex))\r\n $scope.appInfo.authorizationIndex = WebUserSvc.getCurrentAuthorization();\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.appInfo.authorizationIndex))\r\n $scope.appInfo.webUser.CurrentAuthorization = $scope.appInfo.webUser.WebAuthorizations[$scope.appInfo.authorizationIndex];\r\n\r\n $scope.appInfo.backgroundImage = $scope.appInfo.webUser.MenuBackgroundImage;\r\n $scope.appInfo.userLoaded = true;\r\n }\r\n };\r\n\r\n $scope.checkForAppliedProfile = function () {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser) ||\r\n angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser.CurrentWebProfile) ||\r\n angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser.CurrentAuthorization)) {\r\n $scope.applySelectedProfile();\r\n }\r\n };\r\n\r\n $scope.setSubMenu = function (value, location)\r\n {\r\n $scope.locationInfo.sideMenuData.pendingNav = $timeout(function ()\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = value;\r\n $scope.locationInfo.sideMenuData.pendingNav = undefined;\r\n }, 0);\r\n };\r\n\r\n $scope.setWebProfile = function (profileKey)\r\n {\r\n $scope.appInfo.profileKey = profileKey;\r\n WebProfileService.setWebProfile(profileKey).then(function (data)\r\n {\r\n $scope.appInfo.profile = data.WebProfile;\r\n });\r\n };\r\n\r\n $scope.setSystemConfiguration = function ()\r\n {\r\n WebProfileService.setSystemConfiguration().then(function (data)\r\n {\r\n\r\n });\r\n };\r\n\r\n $scope.checkCurrentUserPermissions = function (value, contact)\r\n {\r\n $scope.checkForAppliedProfile();\r\n\r\n if (!contact)\r\n {\r\n if (!$scope.appInfo.webUser) return false;\r\n if (!$scope.appInfo.webUser.CurrentAuthorization) return false;\r\n contact = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact;\r\n }\r\n var webFunctions = contact.CustomerContactWebFunctions;\r\n for (var x = 0; x < value.length; x++)\r\n {\r\n var hasModuleAccess = $scope.checkCurrentCustomerModules(value[x]);\r\n\r\n for (var i = 0; i < webFunctions.length; i++)\r\n //check to see if the current customer has the allowed function.\r\n //then check the contact security.\r\n if (webFunctions[i].WebFnKey === value[x])\r\n if (hasModuleAccess && webFunctions[i].Selected)\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n $scope.checkCurrentUserPermission = function (value, contact)\r\n {\r\n $scope.checkForAppliedProfile();\r\n\r\n if (!contact)\r\n {\r\n if (!$scope.appInfo.webUser) return false;\r\n if (!$scope.appInfo.webUser.CurrentAuthorization) return false;\r\n contact = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact;\r\n }\r\n\r\n //check to see if the current customer has the allowed function.\r\n if (!$scope.checkCurrentCustomerModules(value))\r\n return false;\r\n\r\n if (contact.AllWebFunctions) return true;\r\n\r\n var webFunctions = contact.CustomerContactWebFunctions;\r\n for (var i = 0; i < webFunctions.length; i++)\r\n if (webFunctions[i].WebFnKey === value)\r\n {\r\n return webFunctions[i].Selected;\r\n }\r\n return false;\r\n };\r\n\r\n $scope.checkCurrentCustomerModules = function (value)\r\n {\r\n var currentCustomer = $scope.appInfo.webUser.CurrentAuthorization.Customer;\r\n var isBulkFuel = currentCustomer.BulkFuelCustomer !== 0;\r\n var isCardLock = currentCustomer.CardLockCustomer !== 0;\r\n var isRetail = currentCustomer.RetailCustomer !== 0;\r\n var isWholesale = currentCustomer.WholesaleCustomer !== 0;\r\n var isWebEft = (currentCustomer.WebPmtEFTGrpKey !== null && currentCustomer.WebPmtEFTGrpKey !== 0);\r\n\r\n //check to see if the current customer has the allowed function.\r\n return WebFunctionModules.checkWebFunctionModules(value, isBulkFuel, isCardLock, isRetail, isWholesale, isWebEft, currentCustomer);\r\n };\r\n\r\n $scope.openEdocByRefNo = function (type, key, refNo, custKey)\r\n {\r\n var qs = {\r\n \"EdocDetailsKey\" : 0,\r\n \"Type\" : type,\r\n \"Key\" : key,\r\n \"RefNo\" : refNo,\r\n \"CustKey\" : custKey\r\n };\r\n\r\n EdocService.renderEdocByRefNo(JSON.stringify(qs))\r\n .then(function (edoc) {\r\n var url = EdocService.createUrl(edoc);\r\n window.open(url, '_blank', 'menubar=no,resizable=no,height=600,width=770,toolbar=no');\r\n });\r\n };\r\n\r\n function openNewWindow(url)\r\n {\r\n window.open(url, localStrings.getLocalizedString(\"DocumentViewer\"), 'location=no,menubar=no,resizable=no,scrollbars=no,status=no ,toolbar=no, height=600, width=770');\r\n }\r\n\r\n $scope.openEdoc = function (edocKey)\r\n {\r\n EdocService.renderEdoc(edocKey)\r\n .then(function (edoc){\r\n openNewWindow(EdocService.createUrl(edoc));\r\n });\r\n };\r\n\r\n $scope.openEdocEmail = function (edocKey, senderAddress)\r\n {\r\n if (senderAddress && senderAddress.length > 0)\r\n {\r\n var qs = \"EdocDetailsKey=\" + edocKey +\r\n \"senderAddress=\" + senderAddress;\r\n\r\n encryptData.encrypt(qs).then(function (data)\r\n {\r\n var url = '../EdocDetailsEmail/Index/?x=' + encodeURIComponent(data) + '&y=' + encodeURIComponent(Authentication.userToken());\r\n openNewWindow(url);\r\n });\r\n return;\r\n }\r\n $scope.openEdoc(edocKey);\r\n };\r\n\r\n $scope.openAttachment = function (attachmentGuid)\r\n {\r\n var url = '../api/Attachment/?x=' + attachmentGuid + '&y=' + encodeURIComponent(Authentication.userToken());\r\n openNewWindow(url);\r\n };\r\n\r\n $scope.getWebProfileMessage = function (messageKey)\r\n {\r\n var profileKey = ($scope.appInfo && $scope.appInfo.profileKey) ? $scope.appInfo.profileKey : 0;\r\n\r\n WebProfileService.getWebProfileMessage(profileKey, messageKey).then(function (data)\r\n {\r\n $scope.appInfo.customText = data;\r\n });\r\n };\r\n\r\n //spin up the webprofile service to make sure future calls will load correctly\r\n $scope.getWebProfileMessage(1);\r\n\r\n $scope.$on('$locationChangeStart', function (event, next, current) {\r\n\r\n if ($location.path().search(/(login|SignUp|ResetPassword|SetPassword|SiteDisabled|unsubscribe)/i) > -1)\r\n return;\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo) ||\r\n angular.isUndefinedOrNullOrEmpty(WebUserSvc.getLoggedInWebUserToken())) {\r\n $scope.goTo('/');\r\n }\r\n\r\n $scope.checkForAppliedProfile();\r\n\r\n if (!next || !current || !$scope.appInfo.webUser) return;\r\n\r\n if (next.indexOf('AccountVerifyPayment') < 0 &&\r\n next.indexOf('MakeAPayment') < 0 &&\r\n (current && current.indexOf('/Payments/') >= 0)) {\r\n PaymentService.unLockPayments($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n PaymentService.unockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n }\r\n\r\n if (next.indexOf('EnterPaperwork') < 0 &&//If we are not navigating to metere\r\n next.indexOf('EnterPaperworkTanks') < 0 &&//OR tanks\r\n next.indexOf('EnterPaperworkDeliveries') < 0 &&//OR deliveries\r\n next.indexOf('EnterPaperworkDealerForms') < 0 &&//or forms\r\n next.indexOf('InventorySummary') < 0 &&//or inventory summary\r\n (current && current.indexOf('/Paperwork/') >= 0))//and we are comming from a paperwork url\r\n {\r\n if (!$scope.appInfo.paperwork) return;//if we dont have a paperwork set then return.\r\n if (!$scope.appInfo.paperwork.batch) return;//if we dont have a paperwork set then return.\r\n var submitPaperworkCmdParms =\r\n {\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n EmailAddress: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SubmitPaperwork: false,//If this is hit, then close only.\r\n PreviouslySubmitted: false\r\n };\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms);\r\n }\r\n });\r\n\r\n $scope.$on('$routeChangeError', function (event, current, previous, rejection)\r\n {\r\n switch (rejection)\r\n {\r\n\r\n // Handle invalid auth token errors on route change\r\n case 'authentication:auth-token not valid':\r\n $scope.goTo('/login');\r\n $scope.notifier.show(localStrings.getLocalizedString(\"InvalidCredentials\"), 'error');\r\n break;\r\n\r\n default:\r\n // Display error message to user\r\n $scope.notifier.show('Invalid path', 'error');\r\n }\r\n });\r\n\r\n $scope.urlFormatDate = function (aDate, ignoreIe)\r\n {\r\n if (typeof(aDate) !== 'string' || aDate.isBlank()) return;\r\n\r\n var browser = BrowserService.getBrowserType();\r\n var aDate2 = new Date();\r\n if (Object.prototype.toString.call(aDate) !== '[object Date]')\r\n {\r\n aDate = aDate.substr(0, 10);\r\n aDate2 = new Date(Date.parse(aDate.replace(/-/g, \"/\").replace(/T/g, \" \")));\r\n if (isNaN(aDate2.getTime()))\r\n {\r\n aDate2 = new Date();\r\n }\r\n } else\r\n {\r\n aDate2 = aDate;\r\n }\r\n\r\n if (browser === 'ie' && !ignoreIe)\r\n return (\"0\" + (aDate2.getMonth() + 1)).slice(-2) + '/' + (\"0\" + aDate2.getDate()).slice(-2) + '/' + aDate2.getFullYear();\r\n return aDate2.getFullYear() + '-' + (\"0\" + (aDate2.getMonth() + 1)).slice(-2) + '-' + (\"0\" + aDate2.getDate()).slice(-2);\r\n };\r\n\r\n $scope.formatDate = function (aDate)\r\n {\r\n return $filter('date')(aDate, 'MM/dd/yyyy');\r\n };\r\n\r\n $scope.formatDateTime = function (aDate)\r\n {\r\n return $filter('date')(aDate, 'MM/dd/yyyy hh:mm a');\r\n };\r\n\r\n $scope.addDaysToDate = function addDays(date, days)\r\n {\r\n var result = new Date(date);\r\n result.setDate(result.getDate() + days);\r\n return result;\r\n };\r\n\r\n var successEventListener = $rootScope.$on('event:Success', function (event, data)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesSaved\"), \"success\");\r\n\r\n if (data.opResults.HasWarnings)\r\n {\r\n angular.forEach(data.opResults.Warnings, function (item)\r\n {\r\n $scope.notifier.show(item, \"warning\");\r\n });\r\n }\r\n });\r\n\r\n $scope.$on('$destroy', successEventListener);\r\n\r\n var failedEventListener = $rootScope.$on('event:Failed', function (event, data)\r\n {\r\n if (data.opResults.HasErrors)\r\n {\r\n // Account lock errors go into a custom kendo notification widget\r\n var _accountLockError = localStrings.getLocalizedString(\"AccountLockError\");\r\n\r\n angular.forEach(data.opResults.Errors, function (item)\r\n {\r\n if (item === _accountLockError) {\r\n $scope.lockedAccount.show(item, \"error\");\r\n }\r\n else\r\n $scope.notifier.show(item, \"error\");\r\n });\r\n }\r\n\r\n if (data.opResults.HasWarnings)\r\n {\r\n angular.forEach(data.opResults.Warnings, function (item)\r\n {\r\n $scope.notifier.show(item, \"warning\");\r\n });\r\n }\r\n });\r\n\r\n $scope.$on('$destroy', failedEventListener);\r\n\r\n var errorEventListener = $rootScope.$on('event:Error', function (obj, data) {\r\n var errors = { ExceptionMessage: data.opResults.ExceptionMessage, Stacktrace: data.opResults.StackTrace };\r\n\r\n LoggingService.logErrors(errors).then(function(data) {\r\n console.log(\"Exception was logged please check SIEL in Enterprise Web.\");\r\n });\r\n });\r\n\r\n $scope.$on('$destroy', errorEventListener);\r\n\r\n $scope.goTo = function (path)\r\n {\r\n $location.path(path);\r\n };\r\n\r\n $scope.setFocusOnReady = function setFocusOnReady(elemID)\r\n {\r\n setTimeout(function ()\r\n {\r\n $scope.$apply(function ()\r\n {\r\n $(elemID).focus();\r\n });\r\n }, 100);\r\n };\r\n\r\n $scope.paymentsEnabled = function ()\r\n {\r\n return $scope.appInfo.webUser.CurrentWebProfile.WebPaymentsEnabled &&\r\n $scope.appInfo.webUser.CurrentAuthorization.Customer.UsesWebEFT !== '0' &&\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms > 0 &&\r\n ($scope.checkCurrentUserPermission($scope.webFunctions.AddandEditWebPaymentAccounts) ||\r\n ($scope.checkCurrentUserPermission($scope.webFunctions.AddandEditWebPayments) && $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.ActiveAccountCount > 0 ));\r\n };\r\n\r\n $scope.execOnReady = function execOnReady(func)\r\n {\r\n setTimeout(function ()\r\n {\r\n $scope.$apply(func());\r\n }, 0);\r\n };\r\n\r\n $scope.resetDirtyFlags = function resetDirtyFlags(form)\r\n {\r\n $timeout(function ()\r\n {\r\n form.$setPristine();\r\n $('.k-dirty').removeClass('k-dirty');\r\n $('.k-dirty-cell').removeClass('k-dirty-cell');\r\n }, 0);\r\n };\r\n\r\n $scope.resizeKendoGrid = function resizeKendoGrid(grid, count, offset)\r\n {\r\n var widowHeight = $(window).innerHeight() - offset;\r\n var dataHeight = count * 35;\r\n\r\n if (dataHeight > widowHeight)\r\n {\r\n grid.setOptions({\r\n height: widowHeight,\r\n scrollable: true\r\n });\r\n }\r\n else\r\n {\r\n grid.setOptions({\r\n height: 'inherit',\r\n scrollable: false\r\n });\r\n }\r\n };\r\n\r\n $scope.initializeDateSelector = function() {\r\n $scope.dateSelector = {\r\n displaySelector: true,\r\n selection: 9,\r\n startDate: '',\r\n startMin: '1/1/1900',\r\n startMax: '6/6/2079',\r\n endDate: '',\r\n endMin: '1/1/1900',\r\n endMax: '6/6/2079',\r\n numOfDays: 7,\r\n maxNumOfDays: 90,\r\n options: [\r\n { name: localDateRangeStrings.getLocalizedString(\"Today\"), value: 0 },\r\n { name: localDateRangeStrings.getLocalizedString(\"Yesterday\"), value: 1 },\r\n { name: localDateRangeStrings.getLocalizedString(\"Tomorrow\"), value: 2 },\r\n { name: localDateRangeStrings.getLocalizedString(\"ThisWeek\"), value: 3 },\r\n { name: localDateRangeStrings.getLocalizedString(\"ThisMonth\"), value: 4 },\r\n { name: localDateRangeStrings.getLocalizedString(\"ThisYear\"), value: 5 },\r\n { name: localDateRangeStrings.getLocalizedString(\"PriorWeek\"), value: 6 },\r\n { name: localDateRangeStrings.getLocalizedString(\"PriorMonth\"), value: 7 },\r\n { name: localDateRangeStrings.getLocalizedString(\"PriorYear\"), value: 8 },\r\n { name: localDateRangeStrings.getLocalizedString(\"LastSevenDays\"), value: 9 },\r\n { name: localDateRangeStrings.getLocalizedString(\"LastThirtyDays\"), value: 10 },\r\n { name: localDateRangeStrings.getLocalizedString(\"SelectDates\"), value: 11 },\r\n { name: localDateRangeStrings.getLocalizedString(\"SelectDays\"), value: 12 },\r\n { name: localDateRangeStrings.getLocalizedString(\"AllDays\"), value: 13 }\r\n ],\r\n valid: false,\r\n overrideDefaults: false,\r\n hideAllDays: false,\r\n disabled: false\r\n };\r\n\r\n $scope.dateSelectorInitialized = true;\r\n };\r\n\r\n $scope.$on('$viewContentLoaded', function () {\r\n $timeout(function () {\r\n\r\n //Build localized strings for the entire application once all localization files are rendered\r\n if (!$scope.localizationFilesInitialized) {\r\n var localizationFilesListener = $scope.$watch($('#DateSelectorLocalization innerText'), $timeout(function () {\r\n localizationFilesListener();//Destroy the $watch\r\n localizationSvc.setCachedLocalizations();\r\n $scope.localizationFilesInitialized = true;//Only initialize once\r\n }, true), 0);\r\n }\r\n\r\n // Initialize the dateselector control if it has not been initialized\r\n // From one of the other javascript files\r\n if (!$scope.dateSelectorInitialized) {\r\n $scope.initializeDateSelector();\r\n }\r\n\r\n $scope.modalifier = {\r\n display: false,\r\n title: '',\r\n text: '',\r\n showConfirm: false,\r\n closeBtnTxt: localStrings.getLocalizedString(\"Close\"),\r\n confirmBtnTxt: localStrings.getLocalizedString(\"Yes\"),\r\n show: function (title, text)\r\n {\r\n $scope.modalifier.title = title;\r\n $scope.modalifier.text = text;\r\n $scope.modalifier.showConfirm = false;\r\n $scope.modalifier.display = true;\r\n },\r\n hide: function ()\r\n {\r\n $scope.modalifier.display = false;\r\n },\r\n showSetupError: function ()\r\n {\r\n $scope.modalifier.title = localStrings.getLocalizedString(\"PageSetupError\");\r\n $scope.modalifier.text = localStrings.getLocalizedString(\"SomeDataFailedLoad\") + '
' +\r\n localStrings.getLocalizedString(\"PleaseRefresh\");\r\n $scope.modalifier.showConfirm = false;\r\n $scope.modalifier.display = true;\r\n },\r\n showSavedError: function () {\r\n $scope.modalifier.title = localStrings.getLocalizedString(\"PageSetupError\");\r\n $scope.modalifier.text = localStrings.getLocalizedString(\"DailySettlementFailed\") + '
' +\r\n localStrings.getLocalizedString(\"FuelMetersSaveFailed\");\r\n $scope.modalifier.showConfirm = false;\r\n $scope.modalifier.display = true;\r\n },\r\n showNoResults: function (page)\r\n {\r\n $scope.modalifier.title = page;\r\n $scope.modalifier.text = localStrings.getLocalizedString(\"CriteriaNoResults\");\r\n $scope.modalifier.showConfirm = false;\r\n $scope.modalifier.display = true;\r\n },\r\n confirm: function (text, fnYes, fnNo, title)\r\n {\r\n $scope.modalifier.title = title || localStrings.getLocalizedString(\"Confirm\");\r\n $scope.modalifier.closeBtnTxt = localStrings.getLocalizedString(\"No\");\r\n $scope.modalifier.confirmBtnTxt = localStrings.getLocalizedString(\"Yes\");\r\n $scope.modalifier.text = text;\r\n $scope.modalifier.confirmYes = function ()\r\n {\r\n $scope.modalifier.display = false;\r\n if (!angular.isUndefined(fnYes))\r\n fnYes();\r\n };\r\n $scope.modalifier.confirmNo = function ()\r\n {\r\n $scope.modalifier.display = false;\r\n if (!angular.isUndefined(fnNo))\r\n fnNo();\r\n };\r\n $scope.modalifier.showConfirm = true;\r\n $scope.modalifier.display = true;\r\n },\r\n confirmNo: null,\r\n confirmYes: null\r\n };\r\n }, 0);\r\n });\r\n })\r\n .directive('stringNumber', [function () {\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: function (scope, element, attrs, controller) {\r\n controller.$formatters.push(function (modelValue) {\r\n return Number(modelValue); /*convert to number, for going from to view*/\r\n });\r\n controller.$parsers.push(function (viewValue) {\r\n return '' + viewValue; /*convert to string, for going from view to model*/\r\n });\r\n }\r\n };\r\n }]);\r\n","/**\r\n * Created by rhampton on 2/27/2015.\r\n */\r\nangular.module(\"pnContactUs\", ['ngSanitize', 'core.objects', 'services.payments', 'core.directives'])\r\n .controller(\"ContactUs\", function ($scope, ContactUs, localizationSvc)\r\n {\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"AppLocalization\");\r\n function Message(ct, st, m)\r\n {\r\n this.ContactUsSubject = ct || 0;\r\n this.SubjectText = st || '';\r\n this.ContactUsMessage = m || '';\r\n this.CustomerContactKey = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.Key || 0;\r\n }\r\n\r\n $scope.appInfo.showContactUsModal = false;\r\n\r\n $scope.$watch('appInfo.showContactUsModal', function ()\r\n {\r\n if ($scope.appInfo.showContactUsModal)\r\n {\r\n $scope.message = new Message($scope.CommentContexts[0] ? $scope.CommentContexts[0].Key : '');\r\n $scope.getWebProfileMessage(2);\r\n }\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.CommentContexts = {};\r\n $scope.showErrorBox = false;\r\n\r\n ContactUs.loadContactUsContext().then(function (data)\r\n {\r\n $scope.CommentContexts = data.CommentContexts;\r\n });\r\n };\r\n\r\n $scope.$parent.sendMessage = function ()\r\n {\r\n if (!validateMessage())\r\n return;\r\n\r\n ContactUs.saveMessage($scope.message).then(\r\n function (data)\r\n {\r\n if (data.MessageSent)\r\n {\r\n $scope.appInfo.showContactUsModal = false;\r\n $scope.notifier.show(localStrings.getLocalizedString(\"MessageSent\"), 'success');\r\n }\r\n else\r\n $scope.notifier.show(localStrings.getLocalizedString(\"MessageNotSent\"), 'error');\r\n });\r\n };\r\n\r\n function validateMessage()\r\n {\r\n var valid = true;\r\n\r\n if($scope.CommentContexts.length > 0 && $scope.message.ContactUsSubject.toNumber() < 1)\r\n {\r\n valid = false;\r\n }\r\n\r\n if($scope.CommentContexts.length <= 0 && $scope.message.SubjectText.isBlank())\r\n {\r\n valid = false;\r\n }\r\n\r\n if($scope.message.ContactUsMessage.isBlank())\r\n {\r\n valid = false;\r\n }\r\n\r\n $scope.showErrorBox = !valid;\r\n return valid;\r\n }\r\n });\r\n","/**\r\n * Created by jvitoria on 1/30/2015.\r\n */\r\n\r\n//helper functions\r\nvar getAttrTextFromNodeMap = function (element, attr) {\r\n // get html element attribute by name from a NamedNodeMap\r\n return $('#' + element )[0].attributes.getNamedItem(attr).value;\r\n};\r\n\r\nangular.module(\"pnDateSelector\", ['core.objects'])\r\n .config(function ($provide, templateProvider) {\r\n $provide.constant('templates', templateProvider);\r\n })\r\n .controller(\"dateSelectorCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n })\r\n .directive('dateSelector', function (templates)\r\n {\r\n return {\r\n restrict: 'E',\r\n scope: false,\r\n controller: function ($scope, $rootScope, $filter, localizationSvc)\r\n {\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"DateSelectorLocalization\"); \r\n $scope.initDateSelector = function ()\r\n {\r\n // set defaults\r\n if (!$scope.dateSelector) {\r\n $scope.dateSelector = {};\r\n }\r\n \r\n // reset dateSelector.options based on hideAllDays flag\r\n $scope.dateSelector.options = [];\r\n if ($scope.dateSelector.hideAllDays !== true) {\r\n $scope.dateSelector.options.push(\r\n {name: localStrings.getLocalizedString(\"AllDays\"), value: 13});\r\n }\r\n $scope.dateSelector.options.push(\r\n {name: localStrings.getLocalizedString(\"Today\"), value: 0},\r\n {name: localStrings.getLocalizedString(\"Yesterday\"), value: 1},\r\n {name: localStrings.getLocalizedString(\"Tomorrow\"), value: 2},\r\n {name: localStrings.getLocalizedString(\"ThisWeek\"), value: 3},\r\n {name: localStrings.getLocalizedString(\"ThisMonth\"), value: 4},\r\n {name: localStrings.getLocalizedString(\"ThisYear\"), value: 5},\r\n {name: localStrings.getLocalizedString(\"PriorWeek\"), value: 6},\r\n {name: localStrings.getLocalizedString(\"PriorMonth\"), value: 7},\r\n {name: localStrings.getLocalizedString(\"PriorYear\"), value: 8},\r\n {name: localStrings.getLocalizedString(\"LastSevenDays\"), value: 9},\r\n {name: localStrings.getLocalizedString(\"LastThirtyDays\"), value: 10},\r\n {name: localStrings.getLocalizedString(\"SelectDates\"), value: 11},\r\n {name: localStrings.getLocalizedString(\"SelectDays\"), value: 12});\r\n\r\n $scope.dateSelector.startMin = '1/1/1900';\r\n $scope.dateSelector.startMax = '6/6/2079';\r\n $scope.dateSelector.endMin = '1/1/1900';\r\n $scope.dateSelector.endMax = '6/6/2079';\r\n $scope.dateSelector.disabled = false;\r\n $scope.dateSelector.hideAllDays = false;\r\n\r\n // override parameer data if flag is false\r\n if ($scope.dateSelector.overrideDefaults) {\r\n $scope.dateSelector.overrideDefaults = false;\r\n }\r\n else\r\n {\r\n $scope.dateSelector.displaySelector = true;\r\n $scope.dateSelector.selection = 9;\r\n $scope.dateSelector.startDate = '';\r\n $scope.dateSelector.endDate = '';\r\n $scope.dateSelector.numOfDays = 7;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.valid = false;\r\n }\r\n $scope.onChange();\r\n };\r\n\r\n $scope.validateStartAndEndDate = function ()\r\n {\r\n $scope.dateSelector.valid = Date.parse($scope.dateSelector.startDate) <= Date.parse($scope.dateSelector.endDate);\r\n if (!$scope.dateSelector.valid)\r\n {\r\n // (htmlElement, attribute) \r\n $scope.notifier.show(getAttrTextFromNodeMap('dateSelectorFromThru', 'pdi-date-is-greater-equal-to-msg'), 'error');\r\n }\r\n };\r\n\r\n $scope.onChange = function ()\r\n {\r\n var today = new Date();\r\n var year = new Date().getFullYear();\r\n //month is the only zero based date variable\r\n var month = new Date().getMonth();\r\n var date = new Date().getDate();\r\n var days = new Date().getDay();\r\n\r\n switch (parseInt($scope.dateSelector.selection, 10))\r\n {\r\n case 0: //today\r\n case 14: //single date selector\r\n $scope.dateSelector.startDate = $filter('date')(today, 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $scope.dateSelector.startDate;\r\n break;\r\n case 1: //yesterday\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $scope.dateSelector.startDate;\r\n break;\r\n case 2: //tomorrow\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date + 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $scope.dateSelector.startDate;\r\n break;\r\n case 3: //this week\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - days), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year, month, date - days + 6), 'MM/dd/yyyy');\r\n break;\r\n case 4: //this month\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year, month + 1, 0), 'MM/dd/yyyy');\r\n break;\r\n case 5: //this year\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, 0, 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year, 11, 31), 'MM/dd/yyyy');\r\n break;\r\n case 6: //previous week\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - days - 7), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year, month, date - days - 1), 'MM/dd/yyyy');\r\n break;\r\n case 7: //previous month\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month - 1, 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year, month, 0), 'MM/dd/yyyy');\r\n break;\r\n case 8: //previous year\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year - 1, 0, 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year - 1, 11, 31), 'MM/dd/yyyy');\r\n break;\r\n case 9: //last 7 days\r\n case 11: //select dates\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - 6), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(), 'MM/dd/yyyy');\r\n break;\r\n case 10: //last 30 days\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - 29), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(), 'MM/dd/yyyy');\r\n break;\r\n case 12: //select days\r\n $scope.dateSelector.numOfDays = ($scope.dateSelector.numOfDays > $scope.dateSelector.maxNumOfDays) ? $scope.dateSelector.maxNumOfDays : $scope.dateSelector.numOfDays;\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - $scope.dateSelector.numOfDays + 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(), 'MM/dd/yyyy');\r\n break;\r\n case 13: //all days\r\n $scope.dateSelector.startDate = $filter('date')(new Date(1900, 0, 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(2079, 0, 1), 'MM/dd/yyyy');\r\n break;\r\n }\r\n\r\n /*var debug = 'Date Changed
Start Date: '+ $scope.dateSelector.startDate + '
End Date: '+ $scope.dateSelector.endDate;\r\n $scope.notifier.show(debug ,'info');*/\r\n };\r\n\r\n },\r\n templateUrl: templates.getTemplate(\"DateSelector\")\r\n };\r\n });","/* ==============================================================================\r\n\r\n CORE.AJAX MODULE\r\n\r\n Defines the core.ajax module and it all it's module dependencies\r\n\r\n ============================================================================= */\r\nfunction ApiServiceSettings(settings)\r\n{\r\n this.url = settings.url;\r\n this.data = settings.data;\r\n this.method = settings.method;\r\n this.params = settings.params;\r\n this.responseType = settings.responseType;\r\n this.scope = settings.scope; // if set then this is the scope that validations will execute for\r\n this.skipValidations = settings.skipValidations || false; // if true then POST or PUT validations eval is skipped\r\n}\r\nfunction ApiServiceOperationResult(data)\r\n{\r\n this.Success = data.Success;\r\n this.SuccessMsg = data.SucessMessage;\r\n this.ErrorTitle = data.ErrorTitle;\r\n this.Errors = data.ErrorMessages || [];\r\n this.Warnings = data.WarningMessages || [];\r\n this.HasErrors = (this.Errors.length > 0);\r\n this.HasWarnings = (this.Warnings.length > 0);\r\n this.IsRedirect = data.IsRedirect;\r\n this.RedirectUrl = data.RedirectUrl;\r\n this.Data = data.Data;\r\n}\r\n\r\nangular.module('core.ajax', [])\r\n\r\n /* ==============================================================================\r\n\r\n CORE.AJAX\r\n\r\n Contains helpful methods that are common to most ajax/xhr commands.\r\n\r\n ============================================================================= */\r\n .factory('ajax', ['$http', function ($http)\r\n {\r\n 'use strict';\r\n\r\n return {\r\n\r\n /*\r\n GET\r\n\r\n Simplified abstraction on top of Angular's $http provider.\r\n Performs a \"GET\" Request for a given url and data\r\n */\r\n get: function (url, data)\r\n {\r\n if (data === undefined)\r\n {\r\n return $http({\r\n method: 'GET',\r\n url: url\r\n });\r\n } else\r\n {\r\n return $http({\r\n method: 'GET',\r\n url: url + '/' + data\r\n });\r\n }\r\n },\r\n\r\n /*\r\n POST\r\n\r\n Simplified abstraction on top of Angular's $http provider.\r\n Performs a \"POST\" Request for a given url and data\r\n */\r\n post: function (url, data)\r\n {\r\n return $http({\r\n method: 'POST',\r\n url: url,\r\n data: data,\r\n headers: {\r\n \"Content-Type\": \"application/json\"\r\n }\r\n });\r\n }\r\n };\r\n\r\n }])\r\n .service('apiService',\r\n ['$http', '$q', '$window', 'NotificationService',\r\n function ($http, $q, $window, NotificationService)\r\n {\r\n function webAPICall(settings, notifyOnSuccess, suppressErrors)\r\n {\r\n var opResults = {};\r\n var deferred = $q.defer();\r\n\r\n //// for POST and PUT execute validation on data\r\n //if ((settings.method === 'POST' || settings.method === 'PUT') && !settings.skipValidations) {\r\n // if (!validatorSvc.executeValidations()) {\r\n // return deferred.promise;\r\n // }\r\n //}\r\n\r\n $http({\r\n method: settings.method || 'GET',\r\n url: settings.url,\r\n data: settings.data,\r\n params: settings.params\r\n })\r\n .then(function (data, status, headers, config)\r\n {\r\n opResults = new ApiServiceOperationResult(data.data);\r\n\r\n if (opResults.IsRedirect)\r\n {\r\n $window.location.assign(opResults.RedirectUrl);\r\n\r\n }\r\n else {\r\n if (opResults.Success)\r\n {\r\n if (notifyOnSuccess)\r\n NotificationService.handleSuccess(settings, opResults, status, headers, config);\r\n deferred.resolve(opResults, status, headers, config);\r\n } else\r\n {\r\n if (!suppressErrors) {\r\n NotificationService.handleFailure(settings, opResults, status, headers, config);\r\n }\r\n }\r\n }\r\n\r\n })\r\n .catch(function (data, status, headers, config)\r\n {\r\n if (!suppressErrors) {\r\n NotificationService.handleError(settings, data.data, status, headers, config);\r\n }\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n return {\r\n executeAndNotifyOnSuccess: function (settings)\r\n {\r\n return webAPICall(settings, true, false);\r\n },\r\n executeAndNotifyOnSuccessAndSuppressErrors: function (settings)\r\n {\r\n return webAPICall(settings, true, true);\r\n },\r\n execute: function (settings)\r\n {\r\n return webAPICall(settings, false, false);\r\n },\r\n executeAndSuppressErrors: function (settings)\r\n {\r\n return webAPICall(settings, false, true);\r\n }\r\n };\r\n }\r\n ]);\r\n","/**\r\n * Created by rhampton on 4/25/2014.\r\n */\r\nangular.module('pnHeader', ['core.enums'])\r\n .controller(\"headerMenuCtrl\", function ($scope, $rootScope, WebUserSvc, $filter, $timeout)\r\n {\r\n 'use strict';\r\n $scope.showAccounts = false;\r\n $scope.showUserOpt = false;\r\n $scope.locationInfo.menuLocation = $scope.locationInfo.menuLocation || 0;\r\n $scope.locationInfo.subMenuLocation = $scope.locationInfo.subMenuLocation || -1;\r\n\r\n $scope.setMenuLocation = function (menuLocation)\r\n {\r\n $scope.locationInfo.menuLocation = menuLocation;\r\n $scope.locationInfo.subMenuLocation = -1;\r\n };\r\n $scope.setSubMenuLocation = function (subMenuLocation)\r\n {\r\n $scope.locationInfo.subMenuLocation = subMenuLocation;\r\n };\r\n $scope.checkUserMenuSecurity = function (securityGroup)\r\n {\r\n $scope.checkForAppliedProfile();\r\n if (!$scope.appInfo.webUser) return false;\r\n if (!$scope.appInfo.webUser.CurrentAuthorization) return false;\r\n if ($scope.appInfo.webUser.CurrentAuthorization)\r\n {\r\n return $scope.checkCurrentUserPermissions(securityGroup);\r\n }\r\n return false;\r\n };\r\n $scope.setNewCurrentAuthorization = function (index)\r\n {\r\n $scope.appInfo.authorizationIndex = index;\r\n amplify.store('pnAuthIndex', $scope.appInfo.authorizationIndex);\r\n $scope.showAccounts = false;\r\n\r\n WebUserSvc.retrieveSelectedProfile($scope.appInfo.webUser.Id, $scope.appInfo.profileKey).then(function (data)\r\n {\r\n amplify.store('pnWebProfile', $scope.appInfo.profileKey);\r\n $scope.applySelectedProfile();\r\n $scope.appInfo.webUser.CurrentAuthorization = $scope.appInfo.webUser.WebAuthorizations[$scope.appInfo.authorizationIndex];\r\n $rootScope.$broadcast('event:AccountChange', {});\r\n $scope.goTo('/Home');\r\n });\r\n };\r\n\r\n $scope.showAccountList = function ()\r\n {\r\n $scope.showUserOpt = false;\r\n $scope.showAccounts = !$scope.showAccounts;\r\n };\r\n\r\n $scope.editUser = function ()\r\n {\r\n $scope.showUserOpt = false;\r\n $scope.goTo('/Account/Profile/YourProfile');\r\n };\r\n\r\n $scope.changePassword = function ()\r\n {\r\n $scope.showUserOpt = false;\r\n $scope.goTo('/Account/Profile/ResetPassword');\r\n };\r\n\r\n $scope.showUserOptions = function ()\r\n {\r\n $scope.showAccounts = false;\r\n $scope.showUserOpt = !$scope.showUserOpt;\r\n };\r\n\r\n $scope.headerTimer = {};\r\n $scope.subMenuWaiter = function (menuKey)\r\n {\r\n var barWidth = document.getElementById(\"hdr-submenu\").clientWidth;\r\n var acctWidth = document.getElementById(\"hdr-acctInfo\").clientWidth;\r\n document.getElementById(\"subMenu\" + menuKey).style.width = (barWidth - acctWidth - 30) + 'px';\r\n document.getElementById(\"subMenu\" + menuKey).style.overflowX = \"hidden\";\r\n\r\n $scope.startIndex = 0;\r\n $scope.endIndex = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {ParentKey: menuKey}).length - 1;\r\n $scope.menuLength = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {ParentKey: menuKey}).length - 1;\r\n\r\n $scope.headerTimer = $timeout(function ()\r\n {\r\n $scope.setMenuVisibility(menuKey);\r\n }, 100);\r\n };\r\n\r\n $scope.setMenuVisibility = function (menuKey)\r\n {\r\n var subMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {ParentKey: menuKey});\r\n var barWidth = document.getElementById(\"hdr-submenu\").clientWidth;\r\n var acctWidth = document.getElementById(\"hdr-acctInfo\").clientWidth;\r\n var maxMenuWidth = barWidth - acctWidth - 80;\r\n var currentMenuWidth = 0;\r\n for (var x = 0; x < subMenu.length; x++)\r\n {\r\n var menuItem = subMenu[x];\r\n menuItem.visible = true;\r\n $scope.$apply();\r\n if (x < $scope.startIndex)\r\n {\r\n menuItem.visible = false;\r\n continue;\r\n }\r\n currentMenuWidth += document.getElementById(menuItem.Key).clientWidth + 50;\r\n menuItem.visible = currentMenuWidth < maxMenuWidth;\r\n if (menuItem.visible)\r\n $scope.endIndex = x;\r\n }\r\n };\r\n $scope.moveMenuLeft = function (menuKey)\r\n {\r\n if ($scope.startIndex === 0)\r\n return;\r\n $scope.startIndex -= 1;\r\n $scope.setMenuVisibility(menuKey);\r\n };\r\n $scope.moveMenuRight = function (menuKey)\r\n {\r\n if ($scope.startIndex === $scope.menuLength)\r\n return;\r\n $scope.startIndex += 1;\r\n $scope.setMenuVisibility(menuKey);\r\n };\r\n });","/**\r\n * Created by rhampton on 1/29/2015.\r\n */\r\nangular.module(\"pnDocuments\", ['ngSanitize', 'core.objects', 'services.payments', 'core.directives'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider.when(\"/Dyn/:header/Home\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Dyn\"),\r\n controller: \"DocumentCtrl\"\r\n }\r\n )\r\n .when(\"/Dyn/:header/:sub/Home\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Dyn\"),\r\n controller: \"DocumentCtrl\"\r\n }\r\n )\r\n .when(\"/Dyn/:header/:sub/:side\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Dyn\"),\r\n controller: \"DocumentBodyCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n }\r\n }\r\n }\r\n );\r\n })\r\n .controller(\"DocumentSideMenuCtrl\", function ($scope, $http, $q, $routeParams, $anchorScroll, $filter)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData.subMenu || $scope.locationInfo.sideMenuData.subMenu.length === 0)\r\n {\r\n var menu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.HeaderMenu, {Name: $routeParams.header})[0];\r\n if (menu)\r\n {\r\n $scope.locationInfo.menuLocation = menu.Key;\r\n }\r\n var subMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {\r\n ParentKey: $scope.locationInfo.menuLocation,\r\n Name: $routeParams.sub\r\n })[0];\r\n if (subMenu)\r\n {\r\n $scope.locationInfo.subMenuLocation = subMenu.Key;\r\n }\r\n var sideMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SideMenu, {\r\n ParentKey: $scope.locationInfo.subMenuLocation,\r\n Name: $routeParams.side\r\n })[0];\r\n if (sideMenu)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = sideMenu.Key;\r\n }\r\n }\r\n };\r\n\r\n $scope.setSiteMenuLocation = function (val)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = val;\r\n };\r\n })\r\n .controller(\"DocumentCtrl\", function ($scope, $http, $q, $routeParams, $anchorScroll, $filter, templates)\r\n {\r\n 'use strict';\r\n $scope.locationInfo.menuObject = {};\r\n $scope.locationInfo.subMenuObject = {};\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.sideMenu = '';\r\n $scope.locationInfo.menuText = $routeParams.header;\r\n $scope.locationInfo.subMenuText = $routeParams.sub;\r\n var subMenu = {};\r\n if (!$scope.locationInfo.subMenuText)\r\n {\r\n subMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {ParentKey: $scope.locationInfo.menuLocation})[0];\r\n if (subMenu)\r\n {\r\n $scope.locationInfo.subMenuText = subMenu.Name;\r\n $scope.locationInfo.subMenuLocation = subMenu.Key;\r\n }\r\n } else\r\n {\r\n subMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {\r\n ParentKey: $scope.locationInfo.menuLocation,\r\n Name: $scope.locationInfo.subMenuText\r\n })[0];\r\n if (subMenu)\r\n {\r\n $scope.locationInfo.subMenuLocation = subMenu.Key;\r\n }\r\n\r\n }\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"DocumentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.subMenu || $scope.locationInfo.sideMenuData.subMenu.length === 0)\r\n {\r\n var sideMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SideMenu, {ParentKey: $scope.locationInfo.subMenuLocation})[0];\r\n if (!sideMenu)\r\n {\r\n $scope.goTo('Documents/Account/Statements');\r\n }\r\n\r\n if (sideMenu)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = sideMenu.Key;\r\n $scope.goTo(\"/Dyn/\" + $routeParams.header + \"/\" + $scope.locationInfo.subMenuText + \"/\" + sideMenu.Name);\r\n }\r\n }\r\n\r\n $scope.name = 'document';\r\n };\r\n })\r\n .controller(\"DocumentBodyCtrl\", function ($scope, $http, $q, $routeParams, $anchorScroll, $filter, documentService, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.documentsGrid = {};\r\n $scope.kendo.documentsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n if (!dataItem.Guid)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Documents\"), localStrings.getLocalizedString(\"SelectedDocumentNoLonger\"));\r\n return;\r\n }\r\n else\r\n $scope.openAttachment(dataItem.Guid);\r\n\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"RefDateFormatted\",\r\n title: localStrings.getLocalizedString(\"ReferenceDate\"),\r\n width: 100,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"RefNo\",\r\n title: localStrings.getLocalizedString(\"ReferenceNo\"),\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Description\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.documentsGridInit = function (ds)\r\n {\r\n $scope.kendo.documentsGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.documentsGridDS.read();\r\n $scope.kendo.documentsGrid.dataSource.data($scope.kendo.documentsGridDS.data());\r\n };\r\n\r\n function getDocuments(ref, desc, start, end, custKey, docType, contKey)\r\n {\r\n documentService.listDocuments(ref, desc, start, end, custKey, docType, contKey).then(function (data)\r\n {\r\n if (data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults($scope.locationInfo.documents.name);\r\n return;\r\n }\r\n\r\n angular.forEach(data, function (element)\r\n {\r\n element.RefDateFormatted = element.RefDate === \"0001-01-01T00:00:00\" ? null : $filter('date')(element.RefDate, 'MM/dd/yyyy');\r\n });\r\n\r\n $scope.kendo.documentsGridInit(data);\r\n });\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.checkForAppliedProfile();\r\n\r\n //required to rebuild dymanic sub and side menus in case of user pressing refresh.\r\n if($scope.locationInfo.menuLocation === 0)\r\n {\r\n $scope.goTo('Documents/Account/Statements');\r\n }\r\n\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"DocumentSideMenu\");\r\n\r\n $scope.locationInfo.menuText = $routeParams.header;\r\n $scope.locationInfo.subMenuText = $routeParams.sub;\r\n if (!$scope.locationInfo.documents) $scope.locationInfo.documents = {};\r\n $scope.locationInfo.documents.minDate = new Date(1990, 0, 1);\r\n $scope.locationInfo.documents.name = $routeParams.side;\r\n\r\n //auto load non-transaction document types\r\n var thisMenu = $scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SideMenu.find({Name:$scope.locationInfo.documents.name});\r\n if(thisMenu && thisMenu.SourceType === 0)\r\n {\r\n getDocuments(\r\n '',\r\n '',\r\n '01/01/1900',\r\n '06/01/2075',\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.CustKey,\r\n thisMenu.SourceKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n );\r\n }\r\n\r\n };\r\n\r\n $scope.$parent.applyAction = function (documentType)\r\n {\r\n getDocuments($scope.locationInfo.sideMenuData.documents.referenceNumber,\r\n $scope.locationInfo.sideMenuData.documents.description,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.CustKey,\r\n documentType,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n );\r\n };\r\n })\r\n .controller(\"SectionSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.documents) $scope.locationInfo.sideMenuData.documents = {};\r\n $scope.locationInfo.sideMenuData.documents.referenceNumber = '';\r\n $scope.locationInfo.sideMenuData.documents.description = '';\r\n };\r\n });","/**\r\n * Created by rhampton on 3/11/14.\r\n */\r\nangular.module('pnHome', ['core.ajax', 'ngSanitize'])\r\n .config(['$routeProvider', function ($routeProvider) {\r\n var originalWhen = $routeProvider.when;\r\n var globalResolves = {\r\n webUser: function (WebUserSvc, WebProfileService) {\r\n return WebUserSvc.resolveWebUser().then(function () {\r\n var _user = WebUserSvc.getWebUser();\r\n if (!angular.isUndefinedOrNullOrEmpty(_user) &&\r\n !angular.isUndefinedOrNullOrEmpty(_user.CurrentWebProfile)) {\r\n WebProfileService.setProfileColor(_user.CurrentWebProfile.PrimaryColor);\r\n }\r\n return _user;\r\n });\r\n }\r\n };\r\n $routeProvider.when = function (path, route) {\r\n route.resolve = route.resolve || (route.resolve = {});\r\n angular.extend(route.resolve, globalResolves);\r\n return originalWhen.call($routeProvider, path, route);\r\n };\r\n }])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider.when(\"/Home\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Home\"),\r\n controller: \"homeCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"HomeLocalization\");\r\n }\r\n }\r\n }\r\n );\r\n })\r\n .controller('homeCtrl', function ($scope, $rootScope, ajax, $q, homeService, localStrings, $location, globalizationSvc)\r\n {\r\n 'use strict';\r\n $scope.locationInfo.menuLocation = 0;\r\n $scope.locationInfo.subMenuLocation = -1;\r\n $scope.locationInfo.sideMenu = '';\r\n $scope.modalInfo = {};\r\n $scope.curArticle = 0;\r\n $scope.checkForAppliedProfile();\r\n\r\n //Remove the impersonation GUID from the URL - we no longer need it once we get to Home\r\n $location.search('impersonationGuid', null);\r\n\r\n $scope.toggleModal = function (modalHeader, modalContent)\r\n {\r\n $scope.modalInfo.header = modalHeader;\r\n $scope.modalInfo.content = modalContent;\r\n $scope.modalInfo.shown = !$scope.modalInfo.shown;\r\n };\r\n\r\n $scope.updatePageInfo = function ()\r\n {\r\n if ($scope.appInfo.webUser && $scope.appInfo.webUser.CurrentAuthorization) {\r\n homeService.loadHomePageInformation($scope.appInfo.webUser.CurrentAuthorization.CustContKey).then(function (data)\r\n {\r\n $scope.PageInfo = data;\r\n $scope.formatArticles();\r\n $scope.formatCurrencies();\r\n });\r\n }\r\n else\r\n $scope.logout();\r\n };\r\n\r\n var accountChangeListener = $rootScope.$on('event:AccountChange', function (event, data)\r\n {\r\n $scope.updatePageInfo();\r\n });\r\n\r\n $scope.$on('$destroy', accountChangeListener);\r\n\r\n $scope.updatePageInfo();\r\n\r\n $scope.showLastCreditNotification = function (item)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(item) || angular.isUndefinedOrNullOrEmpty(item.DispType))\r\n return;\r\n\r\n switch ($scope.PageInfo.HomeInfo.LastCreditNotification.DispType) {\r\n case 0:\r\n $scope.emailPopUp = item;\r\n $scope.emailPopUp.show = true;\r\n break;\r\n\r\n case 1:\r\n case 2:\r\n if (item.EdocDtlKey > 0) $scope.openEdoc(item.EdocDtlKey);\r\n else\r\n scope.notifier.show(localStrings.getLocalizedString(\"DocumentNotRetrieved\"), 'error');\r\n break;\r\n\r\n case 3:\r\n if (item.AttachGUID !== null) $scope.openAttachment(item.AttachGUID);\r\n else\r\n scope.notifier.show(localStrings.getLocalizedString(\"AttachmentNotRetrieved\"), 'error');\r\n break;\r\n }\r\n\r\n };\r\n\r\n $scope.showAccountSummary = function ()\r\n {\r\n if ($scope.checkCurrentUserPermission($scope.webFunctions.ViewCreditInformation))\r\n return true;\r\n\r\n if (($scope.PageInfo.HomeInfo.DisplayPastDueMsgAt > 0 && ($scope.PageInfo.HomeInfo.Customer.CrStatus === 1 ||\r\n $scope.PageInfo.HomeInfo.Customer.CrStatus === 6 || $scope.PageInfo.HomeInfo.Customer.CrStatus === 7 ||\r\n $scope.PageInfo.HomeInfo.Customer.CrStatus === 8 || $scope.PageInfo.HomeInfo.Customer.CrStatus === 9)))\r\n return true;\r\n\r\n return ($scope.checkCurrentUserPermission($scope.webFunctions.AddandEditWebPaymentAccounts) && $scope.PageInfo.HomeInfo.AccountNeedingVerificationv);\r\n };\r\n\r\n $scope.showRecentActivity = function ()\r\n {\r\n if (!$scope.PageInfo) return false;\r\n if (!$scope.PageInfo.HomeInfo) return false;\r\n var homeInfo = $scope.PageInfo.HomeInfo;\r\n\r\n if (homeInfo.ScheduledPayment && homeInfo.ScheduledPayment.Amount > 0) return true;\r\n if (homeInfo.PendingEft && homeInfo.PendingEft.Amount > 0) return true;\r\n if (homeInfo.PostedEft && homeInfo.PostedEft.Amount > 0) return true;\r\n if (homeInfo.LastInvoice && homeInfo.LastInvoice.Amount > 0) return true;\r\n if (homeInfo.CustomerActivity && homeInfo.CustomerActivity.LastRcptAmt > 0) return true;\r\n if (homeInfo.CustomerActivity && homeInfo.CustomerActivity.LastStmtAmt > 0) return true;\r\n if (homeInfo.CustomerPriceNotice && homeInfo.CustomerPriceNotice.EdocDetails && homeInfo.CustomerPriceNotice.EdocDetails.DtlKey > 0) return true;\r\n if (homeInfo.LastCreditNotification && homeInfo.LastCreditNotification.DispType > 0) return true;\r\n return false;\r\n };\r\n\r\n $scope.getArticle = function (dir)\r\n {\r\n switch (dir) {\r\n case 'p':\r\n --$scope.curArticle;\r\n if ($scope.curArticle < 0)\r\n $scope.curArticle = $scope.PageInfo.HomeInfo.Announcements.length - 1;\r\n break;\r\n case 'n':\r\n ++$scope.curArticle;\r\n if ($scope.curArticle === $scope.PageInfo.HomeInfo.Announcements.length)\r\n $scope.curArticle = 0;\r\n break;\r\n }\r\n };\r\n\r\n $scope.formatArticles = function ()\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.PageInfo.HomeInfo) || angular.isUndefinedOrNullOrEmpty($scope.PageInfo.HomeInfo.Announcements))\r\n return;\r\n\r\n angular.forEach($scope.PageInfo.HomeInfo.Announcements, function (item)\r\n {\r\n item.Text = item.Text.trim().unescapeHTML().replace(/ /gi, ' ');\r\n });\r\n\r\n };\r\n\r\n // Format all of the currency fields on the home page to whatever the browser locale is\r\n $scope.formatCurrencies = function ()\r\n {\r\n var homeInfo = $scope.PageInfo.HomeInfo;\r\n \r\n var lastInv = homeInfo.LastInvoice.Amount;\r\n var lastStmt = homeInfo.CustomerActivity.LastStmtAmt*-1;\r\n var lastEft = homeInfo.PostedEft.Amount;\r\n var lastPmnt = homeInfo.CustomerActivity.LastRcptAmt;\r\n var pendEft = homeInfo.PendingEft.Amount;\r\n var nextSchPmnt = homeInfo.ScheduledPayment.Amount;\r\n var acctBalance = homeInfo.Customer.AccountBalance;\r\n var unbilledActivity = homeInfo.Customer.UnshippedBalance;\r\n var creditLimit = homeInfo.Customer.CrLimitTotal;\r\n var availableCred = homeInfo.Customer.AvailableCredit;\r\n\r\n homeInfo.LastInvoice.AmountDisplay = globalizationSvc.formatCurrency(lastInv);\r\n homeInfo.CustomerActivity.LastStmtAmtDisplay = globalizationSvc.formatCurrency(lastStmt);\r\n homeInfo.PostedEft.AmountDisplay = globalizationSvc.formatCurrency(lastEft);\r\n homeInfo.CustomerActivity.LastRcptAmtDisplay = globalizationSvc.formatCurrency(lastPmnt);\r\n homeInfo.PendingEft.AmountDisplay = globalizationSvc.formatCurrency(pendEft);\r\n homeInfo.ScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency(nextSchPmnt);\r\n homeInfo.Customer.AccountBalanceDisplay = globalizationSvc.formatCurrency(acctBalance);\r\n homeInfo.Customer.UnshippedBalanceDisplay = globalizationSvc.formatCurrency(unbilledActivity);\r\n homeInfo.Customer.CrLimitTotalDisplay = globalizationSvc.formatCurrency(creditLimit);\r\n homeInfo.Customer.AvailableCreditDisplay = globalizationSvc.formatCurrency(availableCred);\r\n };\r\n });","/**\r\n * Created by rhampton on 5/27/2014.\r\n */\r\nangular.module(\"pnLogin\", [\r\n 'ngRoute',\r\n 'core.enums',\r\n 'core.security'\r\n])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/SignUp/:request?\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"SignUp\"),\r\n controller: \"signupCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"LoginLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/ResetPassword/:request?\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ResetPassword\"),\r\n controller: \"resetPasswordCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"LoginLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/SetPassword/:key\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"GetPasswordTemplate\"),\r\n controller: \"setNewPasswordCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"LoginLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/unsubscribe/:cont?\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Unsubscribe\"),\r\n controller: \"unsubscribeCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"LoginLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/SiteDisabled\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"SiteDisabled\"),\r\n controller: \"siteDisabledCtrl\"\r\n });\r\n })\r\n .controller(\"loginCtrl\", function loginCtrl($scope, $http, $q, $rootScope, $timeout, Authentication, WebUserSvc, WebProfileService, validatorSvc, constantLists, $routeParams, $location, localStrings)\r\n {\r\n 'use strict';\r\n $scope.logout();\r\n $scope.showLogin = false;\r\n $scope.showProfileSelector = false;\r\n $scope.showForgotPassword = false;\r\n\r\n $scope.initializeLogin = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n $scope.applySystemSettings();\r\n $scope.showLogin = true;\r\n\r\n if ($routeParams.impersonationGuid) {\r\n $rootScope.loginInfo.impersonationAccessGuid = $routeParams.impersonationGuid;\r\n $rootScope.loginInfo.userIsImpersonated = true;\r\n $rootScope.automatedLogin = true;\r\n }\r\n\r\n $scope.getRememberMe();\r\n };\r\n\r\n $scope.checkForAutomatedLogin = function () {\r\n if ($rootScope.automatedLogin) {\r\n $scope.loginInfo.userId = $rootScope.automatedLogin.userId || \"\";\r\n $scope.loginInfo.password = $rootScope.automatedLogin.password || \"\";\r\n $scope.authenticateUser();\r\n $rootScope.automatedLogin = undefined;\r\n }\r\n };\r\n\r\n $scope.authenticateUser = function ()\r\n {\r\n // Omit automated logins from triggering empty password / userid validations on elements\r\n if (!$rootScope.automatedLogin && !validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.error = \"\";\r\n $rootScope.passwordExpired = {};\r\n $rootScope.passwordDays = {};\r\n $scope.setRememberMe();\r\n\r\n // Reset the locked account display\r\n $scope.lockedAccount.hide();\r\n\r\n // Attempt to log the user in\r\n Authentication.login($scope.loginInfo.userId, $scope.loginInfo.password, $rootScope.loginInfo.impersonationAccessGuid).then(function (data)\r\n {\r\n // Store the token via LocalStorage (more secure than normal cookies)\r\n var user = data;\r\n var token = user.Token;\r\n amplify.store('pnuser-token', token, { expires: $rootScope.timeout });\r\n\r\n WebUserSvc.validatePasswordComplexity(user.Key, $scope.loginInfo.password, true).then(function (errorList) {\r\n if (errorList.length > 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"PasswordComplexityEnforced\"), 'error');\r\n return;\r\n }\r\n else\r\n {\r\n $scope.retrieveWebUser(user.Key);\r\n }\r\n });\r\n\r\n }, function (err)\r\n {\r\n $scope.error = err;\r\n });\r\n };\r\n\r\n $scope.retrieveWebUser = function (webUserKey)\r\n {\r\n if (Authentication.isAuthenticated())\r\n {\r\n WebUserSvc.retrieveWebUser(webUserKey).then(function (data)\r\n {\r\n data.Answer2 = data.Answer;\r\n $scope.appInfo.webUser = data;\r\n\r\n var _webProfileCount = $scope.appInfo.webUser.WebProfiles.length;\r\n if (_webProfileCount === 0) {\r\n $scope.showLogin = true;\r\n $scope.modalifier.show(\r\n localStrings.getLocalizedString(\"LogIn\"),\r\n localStrings.getLocalizedString(\"NoWebProfile\"));\r\n return;\r\n }\r\n\r\n if (_webProfileCount > 1) {\r\n $scope.showLogin = false;\r\n $scope.showProfileSelector = true;\r\n $scope.appInfo.profileKey = $scope.appInfo.webUser.WebProfiles[0].Key;\r\n return;\r\n }\r\n\r\n if ( _webProfileCount === 1 ) {\r\n $scope.appInfo.profileKey = $scope.appInfo.webUser.WebProfiles[0].Key;\r\n $scope.loadSelectedProfile();\r\n } \r\n return;\r\n });\r\n }\r\n };\r\n\r\n $scope.loadSelectedProfile = function ()\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo.profileKey) || $scope.appInfo.profileKey < 0) {\r\n $scope.appInfo.profileKey = WebUserSvc.getWebUserProfile();\r\n }\r\n\r\n WebUserSvc.retrieveSelectedProfile($scope.appInfo.webUser.Id, $scope.appInfo.profileKey).then(function (data)\r\n {\r\n amplify.store('pnAuthIndex', WebUserSvc.getCurrentAuthorization() || 0);\r\n amplify.store('pnWebProfile', $scope.appInfo.profileKey);\r\n $scope.applySelectedProfile();\r\n $scope.goTo('/Home');\r\n });\r\n };\r\n\r\n $scope.showForgotMyPassword = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n validatorSvc.addScopeToValidate($scope);\r\n\r\n $scope.showLogin = !$scope.showLogin;\r\n $scope.showForgotPassword = !$scope.showForgotPassword;\r\n };\r\n\r\n $scope.submitForgotMyPassword = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n WebUserSvc.processForgotMyPassword($scope.loginInfo.userId).then(function (data)\r\n {\r\n if (data.Success)\r\n $scope.notifier.show(localStrings.getLocalizedString(\"RequestBeingProcessed\"), 'success');\r\n else\r\n $scope.notifier.show(localStrings.getLocalizedString(\"RequestNotProcessed\"), 'error');\r\n });\r\n $scope.showForgotMyPassword();\r\n };\r\n\r\n $scope.setRememberMe = function ()\r\n {\r\n if ($scope.loginInfo.rememberMe)\r\n amplify.store('pnLoginEmail', $rootScope.loginInfo.userId);\r\n else\r\n amplify.store('pnLoginEmail', null);\r\n };\r\n\r\n $scope.getRememberMe = function ()\r\n {\r\n var result = amplify.store('pnLoginEmail');\r\n if (angular.isUndefinedOrNullOrEmpty(result))\r\n {\r\n $rootScope.loginInfo.userId = '';\r\n $rootScope.loginInfo.rememberMe = false;\r\n }\r\n else\r\n {\r\n $rootScope.loginInfo.userId = result;\r\n $rootScope.loginInfo.rememberMe = true;\r\n }\r\n };\r\n })\r\n .controller(\"signupCtrl\", function ($scope, $rootScope, $routeParams, WebUserSvc, validatorSvc, constantLists, localStrings)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n //grab the branding information for the site\r\n $scope.applySystemSettings();\r\n\r\n $scope.signup = {\r\n displayControls: false,\r\n webUser: {\r\n Timestamp: '',\r\n Answer: '',\r\n AnswerClear: '',\r\n GUID: '',\r\n Id: '',\r\n Key: '',\r\n Password: '',\r\n PasswordClear: '',\r\n Question: '',\r\n QuestionClear: '',\r\n Reset: '',\r\n Validated: ''\r\n },\r\n error: [],\r\n controls: {\r\n password: '',\r\n confirmPassword: '',\r\n question: '',\r\n answer: '',\r\n confirmAnswer: '',\r\n valid: true,\r\n secretQuestions: constantLists.secretQuestions\r\n }\r\n };\r\n\r\n $scope.kendo = {instance: null};\r\n\r\n $scope.getWebUser();\r\n };\r\n\r\n $scope.getWebUser = function ()\r\n {\r\n if ($routeParams.request)\r\n {\r\n $scope.signup.webUser.GUID = $routeParams.request;\r\n WebUserSvc.getWebUserForSignup($scope.signup.webUser).then(\r\n function (data)\r\n {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Id))\r\n {\r\n $scope.signup.webUser = data;\r\n $scope.signup.displayControls = true;\r\n return;\r\n }\r\n else\r\n {\r\n $scope.signup.displayControls = false;\r\n $scope.notifier.show(localStrings.getLocalizedString(\"InvalidRequestContact\"), 'error');\r\n $scope.goTo('/');\r\n }\r\n }\r\n );\r\n }\r\n else\r\n {\r\n $scope.GUID = 0;\r\n $scope.notifier.show(localStrings.getLocalizedString(\"URLInvalid\"), \"error\");\r\n $scope.goTo('/');\r\n }\r\n };\r\n\r\n $scope.sendWebUser = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.signup.webUser.PasswordClear = $scope.signup.controls.password;\r\n $scope.signup.webUser.QuestionClear = $scope.signup.controls.question;\r\n $scope.signup.webUser.AnswerClear = $scope.signup.controls.answer;\r\n\r\n WebUserSvc.signupWebUser($scope.signup.webUser).then(\r\n function (data)\r\n {\r\n if (data.Validated === true)\r\n {\r\n $rootScope.automatedLogin = {userId: data.Id, password: $scope.signup.controls.password};\r\n $scope.goTo(\"/\");\r\n }\r\n },\r\n function (err)\r\n {\r\n $scope.signup.errors = [];\r\n\r\n angular.forEach(err, function (item)\r\n {\r\n $scope.notifier.show(item, 'error');\r\n });\r\n }\r\n );\r\n\r\n };\r\n\r\n $scope.clearErrors = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n };\r\n })\r\n .controller(\"resetPasswordCtrl\", function ($scope, $rootScope, $routeParams, WebUserSvc, validatorSvc, localStrings)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n //grab the branding information for the site\r\n $scope.applySystemSettings();\r\n\r\n $scope.resetPassword = {\r\n displayTitle: '',\r\n displayQuestion: false,\r\n displayPassword: false,\r\n displayButton: false,\r\n webUser: {\r\n Timestamp: '',\r\n Answer: '',\r\n AnswerClear: '',\r\n GUID: '',\r\n Id: '',\r\n Key: '',\r\n Password: '',\r\n PasswordClear: '',\r\n Question: '',\r\n QuestionClear: '',\r\n Reset: '',\r\n Validated: ''\r\n },\r\n error: [],\r\n controls: {\r\n password: '',\r\n confirmPassword: '',\r\n answer: '',\r\n valid: true,\r\n buttonText: 'Submit'\r\n }\r\n };\r\n\r\n $scope.getWebUser();\r\n };\r\n\r\n $scope.getWebUser = function ()\r\n {\r\n if ($routeParams.request)\r\n {\r\n $scope.resetPassword.webUser.GUID = $routeParams.request;\r\n WebUserSvc.getWebUserForPasswordReset($scope.resetPassword.webUser).then(\r\n function (data)\r\n {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Id))\r\n {\r\n $scope.resetPassword.webUser = data;\r\n $scope.resetPassword.displayTitle = localStrings.getLocalizedString(\"AnswerSecurityQuestion\");\r\n if ($rootScope.passwordExpired === true)\r\n {\r\n $scope.resetPassword.displayTitle = localStrings.getLocalizedString(\"PasswordExpired\") + '
' + $scope.resetPassword.displayTitle;\r\n }\r\n $scope.resetPassword.displayQuestion = true;\r\n $scope.resetPassword.displayButton = true;\r\n }\r\n else\r\n {\r\n $scope.resetPassword.displayQuestion = false;\r\n $scope.resetPassword.displayPassword = false;\r\n $scope.resetPassword.displayButton = false;\r\n $scope.resetPassword.displayTitle = localStrings.getLocalizedString(\"InvalidRequest\");\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ContactAdmin\"), \"error\");\r\n $scope.goTo('/');\r\n }\r\n }\r\n );\r\n }\r\n else\r\n {\r\n $scope.GUID = 0;\r\n $scope.notifier.show(localStrings.getLocalizedString(\"URLInvalid\"), \"error\");\r\n $scope.goTo('/');\r\n }\r\n };\r\n\r\n $scope.sendAnswer = function ()\r\n {\r\n $scope.resetPassword.webUser.AnswerClear = $scope.resetPassword.controls.answer;\r\n WebUserSvc.verifyWebUserSecretQuestionAnswer($scope.resetPassword.webUser).then(\r\n function (data)\r\n {\r\n if (data === 1)\r\n {\r\n $scope.resetPassword.displayQuestion = false;\r\n $scope.resetPassword.displayTitle = localStrings.getLocalizedString(\"EnterConfirmNewPassword\");\r\n $scope.resetPassword.controls.buttonText = localStrings.getLocalizedString(\"SaveAndLogin\");\r\n $scope.resetPassword.displayPassword = true;\r\n }\r\n else\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"AnswerNotCorrect\"), \"error\");\r\n }\r\n },\r\n function (err)\r\n {\r\n }\r\n );\r\n\r\n };\r\n\r\n $scope.setNewPassword = function ()\r\n {\r\n $scope.resetPassword.webUser.PasswordClear = $scope.resetPassword.controls.password;\r\n WebUserSvc.resetWebUserPassword($scope.resetPassword.webUser).then(\r\n function (data)\r\n {\r\n if (data.Validated === true)\r\n {\r\n $rootScope.automatedLogin = {userId: data.Id, password: $scope.resetPassword.controls.password};\r\n $scope.goTo(\"/\");\r\n }\r\n },\r\n function (err)\r\n {\r\n $scope.resetPassword.errors = [];\r\n\r\n angular.forEach(err, function (item)\r\n {\r\n $scope.notifier.show(item, \"error\");\r\n });\r\n }\r\n );\r\n };\r\n\r\n $scope.submitInfo = function ()\r\n {\r\n $scope.resetPassword.error = [];\r\n\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n if ($scope.resetPassword.displayQuestion)\r\n {\r\n $scope.sendAnswer();\r\n }\r\n\r\n if ($scope.resetPassword.displayPassword)\r\n {\r\n $scope.setNewPassword();\r\n }\r\n };\r\n\r\n $scope.clearErrors = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n };\r\n })\r\n .controller(\"setNewPasswordCtrl\", function ($scope, $rootScope, $routeParams, WebUserSvc, validatorSvc, WebProfileService, localStrings)\r\n {\r\n 'use strict';\r\n $scope.webUserKey = -1;\r\n $scope.webUserToUpdate = {};\r\n\r\n $scope.initialize = function ()\r\n {\r\n var profileKey = ($scope.appInfo && $scope.appInfo.profileKey) ? $scope.appInfo.profileKey : 0;\r\n\r\n WebProfileService.getWebProfileMessage(profileKey, 27).then(function (data)\r\n {\r\n $scope.customMessage = data.isBlank() ? localStrings.getLocalizedString(\"PasswordExpiredNew\") : data;\r\n });\r\n\r\n if ($routeParams.key)\r\n {\r\n $scope.webUserToUpdate = {\r\n Timestamp: '',\r\n Answer: '',\r\n AnswerClear: '',\r\n GUID: '',\r\n Id: '',\r\n Key: $routeParams.key,\r\n Password: '',\r\n PasswordClear: '',\r\n Question: '',\r\n QuestionClear: '',\r\n Reset: '',\r\n Validated: ''\r\n };\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n\r\n };\r\n\r\n $scope.submitPassword = function ()\r\n {\r\n //$scope.resetPassword.error = [];\r\n\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.setNewPassword();\r\n };\r\n\r\n $scope.setNewPassword = function ()\r\n {\r\n $scope.webUserToUpdate.OldPassword = $scope.appInfo.pageInfo.controls.oldPassword;\r\n $scope.webUserToUpdate.PasswordClear = $scope.appInfo.pageInfo.controls.password;\r\n\r\n WebUserSvc.resetWebUserPassword($scope.webUserToUpdate).then(\r\n function (data)\r\n {\r\n $scope.appInfo.pageInfo.success = true;\r\n if (data.Validated === true)\r\n {\r\n $rootScope.automatedLogin = {userId: data.Id, password: $scope.webUserToUpdate.PasswordClear};\r\n $scope.goTo(\"/\");\r\n }\r\n },\r\n function (err)\r\n {\r\n angular.forEach(err, function (item)\r\n {\r\n $scope.notifier.show(item, \"error\");\r\n });\r\n }\r\n );\r\n };\r\n\r\n $scope.clearErrors = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n };\r\n })\r\n .controller(\"unsubscribeCtrl\", function ($scope, $routeParams, validatorSvc, userAccountService, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n //apply the branding information for the site\r\n $scope.applySystemSettings();\r\n\r\n $scope.resultMessage = localStrings.getLocalizedString(\"UnsubscribeRequest\");\r\n\r\n if ($routeParams.cont)\r\n {\r\n userAccountService.unsubscribeContact($routeParams.cont).then(\r\n function (data)\r\n {\r\n if (data.Successful && !data.Unsubscibed)\r\n {\r\n $scope.resultMessage = localStrings.getLocalizedString(\"UnsubscribeSuccessful\");\r\n }\r\n else\r\n {\r\n $scope.resultMessage = localStrings.getLocalizedString(\"UnsubscribeNotSuccessful\");\r\n }\r\n },\r\n function (data) //http request failed\r\n {\r\n $scope.resultMessage = localStrings.getLocalizedString(\"UnsubscribeNotSuccessful\");\r\n });\r\n }\r\n else\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"InvalidRequestContact\"), 'error');\r\n $scope.goTo('/Home');\r\n }\r\n };\r\n })\r\n .controller(\"siteDisabledCtrl\", function siteDisabledCtrl($scope, $window)\r\n {\r\n 'use strict';\r\n\r\n $scope.initializePage = function ()\r\n {\r\n $scope.applySystemSettingsSiteDisabled();\r\n };\r\n });","angular.module(\"pnPages\", ['core.objects', 'services.pages', 'core.directives'])\n .config(function ($routeProvider, templateProvider) {\n $routeProvider\n .when(\"/Pages/\",\n {\n templateUrl: templateProvider.getTemplate(\"Pages\"),\n controller: \"customPagesCtrl\",\n controllerAs: \"ctrl\"\n })\n .when(\"/Pages/Detail/:key\",\n {\n templateUrl: templateProvider.getTemplate(\"PagesDetail\"),\n controller: \"customPagesDetailCtrl\",\n controllerAs: \"customPagesDetailCtrl\",\n resolve: {\n localStrings: function (localizationSvc) {\n return localizationSvc.getCachedLocalizationsContainer(\"PagesLocalization\");\n }\n }\n })\n ;\n })\n .filter('encodeURIComponent', ['$window', function ($window) {\n return function (input) {\n return encodeURIComponent(input);\n };\n }])\n .controller('customPagesCtrl', function ($scope, templates, PagesService, WebFunctions) {\n 'use strict';\n var ctrl = this;\n ctrl.Context = {\n Pages: [],\n Tokens: []\n };\n\n ctrl.initialize = function () {\n if (!$scope.checkCurrentUserPermission(WebFunctions.ViewCustomPages)) {\n $scope.goTo(\"/Home\");\n }\n $scope.locationInfo.menuLocation = 7;\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PagesSideMenu\");\n if (!$scope.locationInfo.sideMenuData)\n $scope.locationInfo.sideMenuData = {};\n $scope.locationInfo.sideMenuData.subMenu = \"0\";\n\n $scope.checkForAppliedProfile();\n PagesService.getWebProfileSiteLayout($scope.appInfo.profileKey).then(function (response) {\n if (response.Successful) {\n //get custom pages key\n var customPagesMenuNode = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.Name === 'Custom Pages';\n });\n if (!angular.isUndefinedOrNullOrEmpty(customPagesMenuNode) && customPagesMenuNode.length === 1) {\n ctrl.Context.Pages = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.ParentKey === customPagesMenuNode[0].Key;\n });\n }\n }\n });\n };\n })\n .controller('customPagesDetailCtrl', function ($scope, $routeParams, PagesService, $sce, WebFunctions, templates, $http, localStrings, $rootScope, $timeout, $interval) {\n 'use strict';\n var ctrl = this;\n ctrl.reloadInterval = 0;\n ctrl.selectedPage = {};\n ctrl.initialize = function (conf) {\n if (!$scope.checkCurrentUserPermission(WebFunctions.ViewCustomPages)) {\n $scope.goTo(\"/Home\");\n }\n\n $scope.locationInfo.menuLocation = 7;\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PagesSideMenu\");\n if (!$scope.locationInfo.sideMenuData)\n $scope.locationInfo.sideMenuData = {};\n $scope.locationInfo.sideMenuData.subMenu = \"0\";\n PagesService.getWebProfileSiteLayout($scope.appInfo.profileKey).then(function (response) {\n if (response.Successful) {\n //get custom pages key\n var customPagesMenuNode = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.Name === 'Custom Pages';\n });\n if (!angular.isUndefinedOrNullOrEmpty(customPagesMenuNode) && customPagesMenuNode.length === 1) {\n var pages = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.ParentKey === customPagesMenuNode[0].Key;\n });\n var key = $routeParams.key;\n if (!angular.isUndefinedOrNullOrEmpty(key)) {\n var selectedIndex = 0;\n var foundPage = pages.filter(function (val, index) {\n if (val.Key.toString() === key) {\n selectedIndex = index;\n return true;\n }\n return false;\n });\n if (!angular.isUndefinedOrNullOrEmpty(foundPage) && foundPage.length > 0) {\n ctrl.selectedPage = foundPage[0];\n $scope.locationInfo.sideMenuData.subMenu = selectedIndex;\n retrieveToken(conf);\n }\n }\n }\n }\n });\n };\n\n function retrieveToken(conf) {\n PagesService.getAccessToken($scope.appInfo.profileKey, ctrl.selectedPage.Key).then(\n function (response) {\n if (response && response.Successful && response.AccessToken.Success) {\n if (angular.isUndefinedOrNullOrEmpty(response.MenuNode.ClientAuthMethod)) {\n var url = $sce.trustAsResourceUrl(ctrl.selectedPage.PageURL);\n angular.element(\"#customPageWrapper\").attr('src', url);\n }\n else {\n if (!angular.isUndefinedOrNullOrEmpty(response.AccessToken.access_token)) {\n switch (response.MenuNode.ClientAuthMethod) {\n case conf.AuthMethods.Header:\n var req = {\n method: 'GET',\n url: ctrl.selectedPage.PageURL,\n headers: {\n 'Authorization': 'Bearer ' + response.AccessToken.access_token\n }\n };\n $http(req).then(\n function (response) {\n // A response status code between 200 and 299 is considered a success status\n if (response.status >= 200 && response.status < 300) {\n var data = response.data || '';\n if (response.data && response.data.indexOf('', '');\n }\n var frame = document.querySelector('#customPageWrapper');\n \n frame.contentWindow.document.open('text/html', 'replace');\n frame.contentWindow.document.write(data);\n frame.contentWindow.document.close();\n }\n },\n function (failed) {\n var msg = localStrings.getLocalizedString(\"UnableProcessPage\").replace('{0}', ctrl.selectedPage.Name);\n $rootScope.notifier.show(msg, 'error');\n }\n );\n break;\n case conf.AuthMethods.URL:\n var glue = (ctrl.selectedPage.PageURL.includes('?') ? '&' : '?');\n var params = glue + 'access_token=' + encodeURIComponent(response.AccessToken.access_token) + '&token_type=' + response.AccessToken.token_type;\n angular.element(\"#customPageWrapper\").attr('src', $sce.trustAsResourceUrl(ctrl.selectedPage.PageURL + params));\n break;\n }\n }\n else {\n var msg = localStrings.getLocalizedString(\"UnableProcessPage\").replace('{0}', ctrl.selectedPage.Name);\n $rootScope.notifier.show(msg, 'error');\n }\n }\n // register auto refresh - force to reload iFrame when approaching token expiration\n if (!angular.isUndefinedOrNullOrEmpty(response.AccessToken.expires_in) && !angular.isUndefinedOrNullOrEmpty(response.AccessToken.access_token)) {\n $timeout(function () {\n retrieveToken(conf);\n }, (response.AccessToken.expires_in * 1000));\n }\n }\n },\n function (failure) {\n var msg = localStrings.getLocalizedString(\"UnableProcessPage\").replace('{0}', ctrl.selectedPage.Name);\n $rootScope.notifier.show(msg, 'error');\n });\n }\n })\n .controller('customPagesSideMenuCtrl', function ($scope, $rootScope, $routeParams, PagesService) {\n 'use strict';\n var ctrl = this;\n ctrl.Context = {\n Pages: []\n };\n ctrl.isSelected = function (index) {\n var retval = $scope.locationInfo.sideMenuData.subMenu === index;\n if (retval) {\n ctrl.selectedPage = ctrl.Context.Pages[index];\n }\n return retval;\n };\n ctrl.initialize = function () {\n PagesService.getWebProfileSiteLayout($scope.appInfo.profileKey).then(function (response) {\n if (response.Successful) {\n //get custom pages key\n var customPagesMenuNode = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.Name === 'Custom Pages';\n });\n if (!angular.isUndefinedOrNullOrEmpty(customPagesMenuNode) && customPagesMenuNode.length === 1) {\n ctrl.Context.Pages = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.ParentKey === customPagesMenuNode[0].Key;\n });\n }\n }\n });\n };\n });\n","/**\r\n * Created by rhampton on 8/19/2014.\r\n */\r\nangular.module(\"pnPaperwork\", ['core.objects'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n\r\n $routeProvider\r\n .when(\"/Paperwork/EnterPaperwork/\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EnterPaperwork\"),\r\n controller: \"enterPaperworkStartCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/EnterPaperwork/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EnterPaperworkMeters\"),\r\n controller: \"enterPaperworkCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/EnterPaperworkDeliveries/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EnterPaperworkDeliveries\"),\r\n controller: \"enterPaperworkDeliveriesCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/EnterPaperworkTanks/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EnterPaperworkTanks\"),\r\n controller: \"enterPaperworkTanksCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/EnterPaperworkDealerForms/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EnterPaperworkDealerForms\"),\r\n controller: \"enterPaperworkDealerFormsCtrl\"\r\n })\r\n .when(\"/Paperwork/ReviewPaperwork\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ReviewPaperwork\"),\r\n controller: \"reviewPaperworkCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/Reports\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ReportsPaperwork\"),\r\n controller: \"reportsPaperworkStartCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/Reports/:reportName\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ReportsPaperwork\"),\r\n controller: \"paperworkReportCtrl\"\r\n })\r\n .when(\"/Paperwork/ViewPaperwork/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewPaperwork\"),\r\n controller: \"enterPaperworkCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/ViewPaperworkTanks/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewPaperworkTanks\"),\r\n controller: \"enterPaperworkTanksCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/ViewPaperworkDeliveries/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewPaperworkDeliveries\"),\r\n controller: \"enterPaperworkDeliveriesCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/ViewPaperworkDealerForms/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewPaperworkDealerForms\"),\r\n controller: \"enterPaperworkDealerFormsCtrl\"\r\n })\r\n .when(\"/Paperwork/InventorySummary\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"InventorySummary\"),\r\n controller: \"inventorySummaryCtrl\"\r\n })\r\n .when(\"/Paperwork/InventorySummary/:sitekey/:paperworkDate\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"InventorySummary\"),\r\n controller: \"inventorySummaryCtrl\"\r\n });\r\n })\r\n .controller('reviewPaperworkSideMenuCtrl', function ($scope, PaperworkService, PaperworkReportsService, WebFunctions, $location)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $scope.appInfo.paperwork.context = $scope.appInfo.paperwork.context || {};\r\n $scope.appInfo.paperwork.reports = $scope.appInfo.paperwork.reports || {};\r\n $scope.locationInfo.sideMenuData.reviewPaperwork = {};\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.loaded = false;\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.unposted = true;\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n\r\n // There is a race condition when reloading the page\r\n // Check if the date selector is undefined, if it is then initialize it\r\n if (angular.isUndefinedOrNullOrEmpty($scope.dateSelector)) {\r\n $scope.initializeDateSelector();\r\n }\r\n\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.displaySelector = true;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.selection = 11;\r\n\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true).then(\r\n function (data) {\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.loaded = true;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n $scope.setSiteDescByKey();\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem) {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n },\r\n function (err) {\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.loaded = true;\r\n //TODO: notify somebody\r\n }\r\n );\r\n\r\n PaperworkReportsService\r\n .getPaperworkReports($scope.appInfo.webUser.CurrentAuthorization.CustContKey, false)\r\n .then(function (data) {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkReports)) {\r\n $scope.appInfo.paperwork.reports.paperworkReports = data.PaperworkReports;\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.setSiteDescByKey = function ()\r\n {\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.context.selectedSite)\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n });\r\n };\r\n })\r\n .controller('enterPaperworkSideMenuCtrl', function ($scope, PaperworkService, $filter, WebFunctions, $rootScope, localizationSvc, setupNav, $location)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n $scope.retailWarningMessage = localStrings.getLocalizedString(\"WarningRetailPrice\");\r\n $scope.averageWarningMessage = localStrings.getLocalizedString(\"WarningAveragePrice\");\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.paperwork = {};\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n };\r\n\r\n $scope.setupAppNavigation = function ()\r\n {\r\n angular.forEach($scope.appInfo.paperwork.apps, function (app, index)\r\n {\r\n if (app.MenuCode === 'DREFD')\r\n {\r\n $scope.locationInfo.sideMenuData.paperwork.deliveries = app;\r\n }\r\n if (app.MenuCode === 'DREGM')\r\n {\r\n $scope.locationInfo.sideMenuData.paperwork.meters = app;\r\n }\r\n if (app.MenuCode === 'DREGS')\r\n {\r\n $scope.locationInfo.sideMenuData.paperwork.tanks = app;\r\n }\r\n if (app.DealerFormVersionKey > 0)\r\n {\r\n app.MenuCode = 'DRDFE';\r\n $scope.locationInfo.sideMenuData.paperwork.forms = app;\r\n $scope.appInfo.paperwork.form.AppKey = app.Key;\r\n }\r\n });\r\n };\r\n\r\n $scope.openNewPaperworkBatch = function ()\r\n {\r\n PaperworkService.OpenPaperworkBatch(\r\n $scope.appInfo.paperwork.context.selectedSite,\r\n $scope.urlFormatDate($scope.locationInfo.sideMenuData.paperwork.date, true),\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n false\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n $scope.appInfo.paperwork.paperworkKey = $scope.appInfo.paperwork.batch.Key;\r\n $scope.setupAppNavigation();\r\n \r\n $rootScope.$broadcast('event:NewPaperworkBatchLoaded', {});\r\n });\r\n };\r\n\r\n var pwLoadedListener = $rootScope.$on('event:PaperworkLoaded', function (event, viewOnly, data)\r\n {\r\n $scope.setupAppNavigation();\r\n });\r\n $scope.$on('$destroy', pwLoadedListener);\r\n\r\n $scope.navPg = function (menuCode)\r\n {\r\n $scope.appInfo.paperwork.viewOnly = false;\r\n\r\n if ($location.$$path.indexOf('/ViewPaperwork/') > -1) $scope.appInfo.paperwork.viewOnly = true;\r\n if ($location.$$path.indexOf('/ViewPaperworkDeliveries/') > -1) $scope.appInfo.paperwork.viewOnly = true;\r\n if ($location.$$path.indexOf('/ViewPaperworkTanks/') > -1) $scope.appInfo.paperwork.viewOnly = true;\r\n if ($location.$$path.indexOf('/ViewPaperworkDealerForms/') > -1) $scope.appInfo.paperwork.viewOnly = true;\r\n \r\n // Broadcast the current module menu code this will trigger save in each controller when paperwork is in Enter mode before going to another menu\r\n if($scope.appInfo.paperwork.viewOnly) $rootScope.$broadcast('event:PageStage', setupNav.resolveCurrentPageMenuCode($location.$$path));\r\n\r\n $scope.goTo(setupNav.getSinglePath(menuCode,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n };\r\n\r\n })\r\n .controller('inventorySummarySideMenuCtrl', function ($scope, PaperworkService, PaperworkReportsService, $routeParams, WebFunctions, reportingService, validatorSvc)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n $scope.$root.reportSettings.reportKey = 19;\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.inventorySummary = {};\r\n $scope.locationInfo.sideMenuData.subMenu = '3';\r\n $scope.locationInfo.sideMenuData.inventorySummary.reportType = 'PaperworkSummary ';\r\n $scope.appInfo = $scope.appInfo || {};\r\n $scope.appInfo.paperwork = $scope.appInfo.paperwork || {};\r\n $scope.appInfo.paperwork.context = $scope.appInfo.paperwork.context || {};\r\n $scope.appInfo.paperwork.reports = $scope.appInfo.paperwork.reports || {};\r\n\r\n $scope.appInfo.paperwork.context.selectedSiteObj = { SiteKey: -1 };\r\n\r\n // There is a race condition when reloading the page\r\n // Check if the date selector is undefined, if it is then initialize it\r\n if (angular.isUndefinedOrNullOrEmpty($scope.dateSelector)) {\r\n $scope.initializeDateSelector();\r\n }\r\n\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.displaySelector = false;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.selection = 14;\r\n\r\n PaperworkService\r\n .getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true)\r\n .then(function (data)\r\n {\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n\r\n if (!$scope.setSiteAndDate())\r\n {\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey = data.SelectedSiteKey;\r\n $scope.dateSelector.startDate = $scope.formatDate(data.NextPaperworkDate);\r\n }\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n $scope.applyAction();\r\n },\r\n function (err)\r\n {\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.loaded = true;\r\n //TODO: notify somebody\r\n }\r\n );\r\n\r\n PaperworkReportsService\r\n .getPaperworkReports($scope.appInfo.webUser.CurrentAuthorization.CustContKey, false)\r\n .then(function (data) {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkReports)) {\r\n $scope.appInfo.paperwork.reports.paperworkReports = data.PaperworkReports;\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.inventorySummary = $scope.reportSettings.loadOptions.controls;\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey = $scope.reportSettings.loadOptions.selectedSite;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.inventorySummary;\r\n $scope.reportSettings.saveOptions.selectedSite = $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.setNextPaperworkDate = function (e)\r\n {\r\n if ($scope.setSiteAndDate())\r\n return;\r\n\r\n PaperworkService.getNextPaperworkDate(e.sender.dataItem(e.sender.select()).SiteKey, true).then(\r\n function (data)\r\n {\r\n $scope.dateSelector.startDate = $scope.formatDate(data);\r\n }\r\n );\r\n };\r\n\r\n $scope.setSiteAndDate = function ()\r\n {\r\n if ($routeParams.sitekey && $routeParams.paperworkDate)\r\n {\r\n $scope.appInfo.paperwork.context.selectedSiteObj = {SiteKey: -1};\r\n\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey = parseInt($routeParams.sitekey, 10);\r\n $scope.dateSelector.startDate = $scope.formatDate($routeParams.paperworkDate);\r\n return true;\r\n }\r\n else\r\n return false;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n PaperworkService.ValidatePaperworkSiteDateForContact(\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey,\r\n $scope.urlFormatDate($scope.dateSelector.startDate, true),\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n false // not for entry\r\n ).then(function (data)\r\n {\r\n var qs = \"reportName=\" + $scope.locationInfo.sideMenuData.inventorySummary.reportType +\r\n \"&RP-SiteKey=\" + $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey +\r\n \"&RP-PWDate=\" + $scope.dateSelector.startDate;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n });\r\n\r\n };\r\n })\r\n .controller('reportsPaperworkStartCtrl', function ($scope, WebFunctions, templates, localStrings, PaperworkReportsService)\r\n {\r\n 'use strict';\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n \r\n $scope.appInfo = $scope.appInfo || {};\r\n $scope.appInfo.paperwork = {\r\n context: {},\r\n paperworkKey: 0,\r\n reports: {}\r\n };\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.appInfo.paperwork.reports.paperworkReports = [];\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportsSideMenu\");\r\n $scope.locationInfo.sideMenuData.paperwork = {};\r\n $scope.locationInfo.showEnterPaperworkMenuItem = false;\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 31;\r\n\r\n PaperworkReportsService\r\n .getPaperworkReports($scope.appInfo.webUser.CurrentAuthorization.CustContKey, false)\r\n .then(function (data) {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkReports)) {\r\n $scope.appInfo.paperwork.reports.paperworkReports = $scope.localizeReports(data.PaperworkReports).sort($scope.compareDisplayNames);\r\n }\r\n else {\r\n $scope.goTo(\"/Paperwork/EnterPaperwork\");\r\n $scope.modalifier.showSetupError();\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.localizeReports = function (reports) {\r\n angular.forEach(reports, function (report) {\r\n report.DisplayName = localStrings.getLocalizedString('SSRSReport' + report.Name);\r\n });\r\n\r\n return reports;\r\n };\r\n\r\n $scope.compareDisplayNames = function (a, b) {\r\n return a.DisplayName.localeCompare(b.DisplayName);\r\n };\r\n })\r\n .controller('enterPaperworkStartCtrl', function ($scope, $location, PaperworkService, PaperworkReportsService, WebFunctions, validatorSvc, templates, localStrings, setupNav)\r\n {\r\n 'use strict';\r\n $scope.averageWarningMessage = localStrings.getLocalizedString(\"WarningAveragePrice\");\r\n $scope.retailWarningMessage = localStrings.getLocalizedString(\"WarningRetailPrice\");\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n\r\n $scope.appInfo = $scope.appInfo || {};\r\n $scope.appInfo.paperwork = {\r\n context: {},\r\n paperworkKey: 0,\r\n reports: {}\r\n };\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.appInfo.paperwork.reports.paperworkReports = [];\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.paperwork = {};\r\n $scope.locationInfo.sideMenuData.isFirstPage = false;\r\n $scope.locationInfo.sideMenuData.isLastPage = false;\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n $scope.locationInfo.showEnterPaperworkMenuItem = false;\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n\r\n // There is a race condition when reloading the page\r\n // Check if the date selector is undefined, if it is then initialize it\r\n if (angular.isUndefinedOrNullOrEmpty($scope.dateSelector)) {\r\n $scope.initializeDateSelector();\r\n }\r\n\r\n $scope.dateSelector.displaySelector = true;\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.selection = 11;\r\n\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, false).then(\r\n function (data)\r\n {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkSites))\r\n {\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n $scope.locationInfo.sideMenuData.paperwork.date = $scope.formatDate(data.NextPaperworkDate);\r\n $scope.locationInfo.sideMenuData.paperwork.minDate = $scope.formatDate(data.HistoryLimit);\r\n $scope.locationInfo.sideMenuData.paperwork.maxDate = $scope.formatDate(data.FutureLimit);\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n $scope.setSiteDescByKey();\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n }\r\n );\r\n\r\n PaperworkReportsService\r\n .getPaperworkReports($scope.appInfo.webUser.CurrentAuthorization.CustContKey, false)\r\n .then(function (data) {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkReports)) {\r\n $scope.appInfo.paperwork.reports.paperworkReports = data.PaperworkReports;\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.setNextPaperworkDate = function (e)\r\n {\r\n PaperworkService.getNextPaperworkDate(e.sender.dataItem(e.sender.select()).SiteKey, false).then(\r\n function (data)\r\n {\r\n $scope.dateSelector.startDate = $scope.formatDate(data);\r\n $scope.locationInfo.sideMenuData.paperwork.date = $scope.dateSelector.startDate;\r\n }\r\n );\r\n };\r\n\r\n $scope.setSiteDescByKey = function ()\r\n {\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.context.selectedSite)\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n });\r\n };\r\n\r\n $scope.openNewPaperworkBatch = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n PaperworkService.OpenPaperworkBatch(\r\n $scope.appInfo.paperwork.context.selectedSite,\r\n $scope.urlFormatDate($scope.locationInfo.sideMenuData.paperwork.date, true),\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n false\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n $scope.appInfo.paperwork.paperworkKey = $scope.appInfo.paperwork.batch.Key;\r\n \r\n $scope.goTo(setupNav.getRouterPath($scope.appInfo.paperwork.apps[0],$scope.appInfo.paperwork.paperworkKey, ($scope.appInfo.paperwork.batch.SubmitStatus >= \"3\")));\r\n });\r\n };\r\n })\r\n .controller('reviewPaperworkCtrl', function ($scope, $rootScope, validatorSvc, $location, PaperworkService, WebFunctions, $filter, templates, localStrings, globalizationSvc, setupNav)\r\n {\r\n 'use strict';\r\n validatorSvc.clearValidationScopes();\r\n $scope.kendo = {};\r\n $scope.kendo.paperworkHistoryGrid = {};\r\n $scope.kendo.paperworkHistoryGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"PaperworkDateFormatted\",\r\n title: localStrings.getLocalizedString(\"PaperworkDate\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"SubmitStatusDesc\",\r\n title: localStrings.getLocalizedString(\"Status\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"TotalFuelSales\",\r\n title: localStrings.getLocalizedString(\"DailyTotal\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: [],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true,\r\n width: '50%'\r\n };\r\n\r\n $scope.kendo.paperworkHistoryGridInit = function (ds)\r\n {\r\n $scope.kendo.paperworkHistoryGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.paperworkHistoryGridDS.read();\r\n $scope.kendo.paperworkHistoryGrid.dataSource.data($scope.kendo.paperworkHistoryGridDS.data());\r\n };\r\n\r\n $scope.reviewPaperwork = {};\r\n $scope.selectedReviewSite = {};\r\n $scope.viewPaperworkHistory = false;\r\n $scope.reviewLoaded = false;\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.noRecordsFound = false;\r\n $scope.appInfo = $scope.appInfo || {};\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $scope.reviewLoaded = true;\r\n };\r\n\r\n $scope.allEntry = function (batch)\r\n {\r\n return (batch.PaperworkDate > batch.InvtyCOGSDate) &&\r\n (batch.PaperworkDate > batch.FuelCOGSDate) &&\r\n (batch.SubmitStatus < 3 || !$scope.appInfo.paperwork.context.lockPaperworkAfterDru);\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n\r\n $scope.modalifier.hide();\r\n PaperworkService.getPaperworkBatchesByDate(\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey,\r\n $scope.urlFormatDate($scope.dateSelector.startDate, true),\r\n $scope.urlFormatDate($scope.dateSelector.endDate, true),\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.unposted ? 1 : 0\r\n ).then(function (data)\r\n {\r\n if (data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"PaperworkHistory\"));\r\n }\r\n\r\n data.each(function (item)\r\n {\r\n item.PaperworkDateFormatted = globalizationSvc.formatDateTime(item.PaperworkDate, 'd');\r\n item.TotalFuelSales = globalizationSvc.formatCurrency(item.TotalFuelSales);\r\n });\r\n\r\n $scope.kendo.paperworkHistoryGridInit(data);\r\n $scope.viewPaperworkHistory = true;\r\n });\r\n };\r\n\r\n $scope.loadPaperwork = function (item, isEntry)\r\n {\r\n PaperworkService.ValidatePaperworkSiteDateForContact(\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey,\r\n item.PaperworkDateFormatted,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n isEntry || false\r\n );\r\n\r\n PaperworkService.OpenPaperworkBatch(\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey,\r\n item.PaperworkDateFormatted,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n false\r\n ).then(function (data)\r\n {\r\n data.PaperworkBatch.PaperworkApps.find(function (item){\r\n if (item.DealerFormVersionKey > 0) {\r\n item.MenuCode = 'DRDFE';\r\n }\r\n });\r\n \r\n $location.path(setupNav.getSinglePath(data.PaperworkBatch.PaperworkApps[0].MenuCode, item.Key, !isEntry, false));\r\n });\r\n };\r\n })\r\n .controller('enterPaperworkCtrl', function ($scope, $rootScope, $routeParams, PaperworkService, $filter, $location, $timeout, WebFunctions,\r\n PaperworkMetersService, validatorSvc, templates, localStrings, globalizationSvc, setupNav)\r\n {\r\n 'use strict';\r\n $scope.averageWarningMessage = localStrings.getLocalizedString(\"WarningAveragePrice\");\r\n $scope.retailWarningMessage = localStrings.getLocalizedString(\"WarningRetailPrice\");\r\n $scope.appInfo.paperwork.paperworkKey = 0;\r\n $scope.appInfo.paperwork.showRetailPrice = false;\r\n $scope.appInfo.paperwork.showEndingDollar = false;\r\n $scope.appInfo.paperwork.showNetDollars = false;\r\n $scope.appInfo.paperwork.showEndingUnits = false;\r\n $scope.appInfo.paperwork.showNetUnits = false;\r\n $scope.appInfo.paperwork.showAvgPrice = false;\r\n $scope.appInfo.paperwork.showBeginMeters = false;\r\n\r\n $scope.appInfo.paperwork.meters = {};\r\n\r\n $scope.modalInfo = {};\r\n $scope.metersLoaded = false;\r\n\r\n $scope.kendo = {};\r\n\r\n $scope.kInputOptions = {\r\n culture: globalizationSvc.getLocale(),\r\n format: \"n\",\r\n decimals: 2,\r\n spinners: false\r\n };\r\n\r\n $scope.MaxUnits = 100000000;\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler()\r\n {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n $scope.appInfo.paperwork.viewOnly = $location.$$path.indexOf('/ViewPaperwork/') > -1;\r\n\r\n $scope.metersEditable = true;\r\n\r\n if ($routeParams.paperworkKey)\r\n {\r\n $scope.appInfo.paperwork.paperworkKey = $routeParams.paperworkKey;\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n // $scope.getWebProfileMessage(19);\r\n $scope.appInfo.paperwork.batch = {};\r\n\r\n if (!$scope.appInfo.paperwork.context)\r\n {\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true).then(\r\n function (data)\r\n {\r\n $scope.appInfo.paperwork.context = {};\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n }\r\n );\r\n } else\r\n {\r\n\r\n }\r\n\r\n\r\n if ($scope.appInfo.paperwork.paperworkKey > 0)\r\n {\r\n //We are loading a known existing paperwork batch\r\n PaperworkService.OpenPaperworkBatchByKey(\r\n $scope.appInfo.paperwork.paperworkKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n $scope.appInfo.paperwork.viewOnly\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n \r\n // resolve if this is the first or last page\r\n var res = setupNav.firstLastPage('DREGM',$scope.appInfo.paperwork.apps);\r\n $scope.locationInfo.sideMenuData.isFirstPage = res.isFirstPage;\r\n $scope.locationInfo.sideMenuData.isLastPage = res.isLastPage;\r\n\r\n $rootScope.$broadcast('event:PaperworkLoaded', $scope.appInfo.paperwork.viewOnly, $scope.appInfo.paperwork.paperworkKey);\r\n\r\n var nextApp = true;\r\n angular.forEach($scope.appInfo.paperwork.apps, function (app, index)\r\n {\r\n if (app.MenuCode === 'DREGM')\r\n {\r\n $scope.loadMeters();\r\n nextApp = false;\r\n }\r\n });\r\n if (nextApp)\r\n {\r\n $scope.goTo(setupNav.navigateToPage('DREGM',$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n }\r\n }, function ()\r\n {\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n });\r\n }\r\n $scope.locationInfo.sideMenuData.pwSubMenu = '1';\r\n $scope.appInfo.paperwork.meterIndex = 0;\r\n\r\n\r\n };\r\n\r\n var gridColEditorInput = function (container, options)\r\n {\r\n\r\n var fieldName = \"'\" + options.field + \"'\";\r\n\r\n var required = $(container).attr('required'); // field is required\r\n\r\n // For some browsers, `attr` is undefined; for others,\r\n // `attr` is false. Check for both.\r\n\r\n var input = $('');\r\n input.kendoNumericTextBox({\r\n culture: globalizationSvc.getLocale(),\r\n format: 'n3',\r\n decimals: 3,\r\n max: $scope.MaxUnits,\r\n min: -$scope.MaxUnits\r\n });\r\n\r\n input.attr('name', options.field);\r\n input.attr('data-bind', 'value:' + options.field);\r\n input.attr('ng-blur', 'gridInputCellOnBlur(dataItem, ' + fieldName + ')');\r\n input.attr('style', 'border: \"none\"');\r\n\r\n if (typeof required !== typeof undefined && required !== false)\r\n {\r\n input.attr('required');\r\n input.attr('data-Required-msg=\"Required\"');\r\n }\r\n\r\n input.appendTo(container);\r\n };\r\n\r\n var cellIndex = \"\";\r\n var rowIndex = \"\";\r\n\r\n var gridColNumber = function (field, format)\r\n {\r\n return '';\r\n };\r\n\r\n $scope.initializeMetersGrid = function ()\r\n {\r\n\r\n $scope.metersGridDS = new kendo.data.DataSource({\r\n schema: {\r\n model: {\r\n id: \"DispenserNo\",\r\n fields: {\r\n DispenserNo: {type: 'number', editable: false},\r\n FuelPositionNo: {type: 'number', editable: false},\r\n ProductDescription: {type: 'string', editable: false},\r\n RtlPrice: {type: \"number\", format: \"{n3}\", editable: true},\r\n EndAmount: {type: \"number\", editable: true},\r\n NetAmount: {type: \"number\", editable: true},\r\n EndUnits: {type: \"number\", editable: true},\r\n NetUnits: {type: \"number\", editable: true},\r\n CalcPrice: {type: \"number\", editable: false}\r\n }\r\n }\r\n },\r\n data: $scope.appInfo.paperwork.meters,\r\n batch: true,\r\n aggregate: [{ field: \"RtlPrice\", aggregate: \"sum\" }, { field: \"NetUnits\", aggregate: \"sum\" }, { field: \"NetAmount\", aggregate: \"sum\" }]\r\n });\r\n\r\n $scope.metersGridOptions = {\r\n dataSource: $scope.metersGridDS,\r\n columns: [\r\n {\r\n title: localStrings.getLocalizedString(\"Fuel\"),\r\n columns: [\r\n {\r\n field: \"DispenserNo\",\r\n title: localStrings.getLocalizedString(\"Disp\"),\r\n width: 40,\r\n attributes: {\"data-field\": \"DispenserNo\", \"class\": \"tableCellDisabled\"}\r\n },\r\n {\r\n field: \"FuelPositionNo\",\r\n title: localStrings.getLocalizedString(\"Pos\"),\r\n width: 40,\r\n attributes: {\"data-field\": \"FuelPosition\", \"class\": \"tableCellDisabled\"}\r\n },\r\n {\r\n field: \"ProductDescription\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {\r\n \"data-field\": \"ProductDescription\",\r\n \"class\": \"tableCellDisabled description\"\r\n },\r\n footerTemplate: localStrings.getLocalizedString(\"Totals\")\r\n }\r\n ]\r\n },\r\n {\r\n field: \"RtlPrice\",\r\n width: 80,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"RtlPrice\", \"n3\"),\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"RetailPrice\") +\"\",\r\n attributes: {\"data-field\": \"RtlPrice\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n hidden: !$scope.appInfo.paperwork.showRetailPrice,\r\n aggregates: [\"sum\"],\r\n footerTemplate: \"
#=sum.toLocaleString('en-US', {minimumFractionDigits: 3})#
\"\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Dollars\"),\r\n columns: [\r\n {\r\n field: \"EndAmount\",\r\n title: localStrings.getLocalizedString(\"EndingMeter\"),\r\n width: 110,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"EndAmount\", \"n2\"),\r\n attributes: {\"data-field\": \"EndAmount\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n hidden: !$scope.appInfo.paperwork.showEndingDollar\r\n },\r\n {\r\n field: \"NetAmount\",\r\n title: localStrings.getLocalizedString(\"Net\"),\r\n width: 110,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"NetAmount\", \"n2\"),\r\n attributes: {\"data-field\": \"NetAmount\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n hidden: !$scope.appInfo.paperwork.showNetDollars,\r\n aggregates: [\"sum\"],\r\n footerTemplate: \"
#= sum.toLocaleString('en-US', { minimumFractionDigits: 2 })#
\"\r\n }\r\n ]\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Units\"),\r\n columns: [\r\n {\r\n field: \"EndUnits\",\r\n title: localStrings.getLocalizedString(\"EndingMeter\"),\r\n width: 110,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"EndUnits\", \"n3\"),\r\n attributes: {\"data-field\": \"EndUnits\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n hidden: !$scope.appInfo.paperwork.showEndingUnits\r\n },\r\n {\r\n field: \"NetUnits\",\r\n title: localStrings.getLocalizedString(\"Net\"),\r\n width: 110,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"NetUnits\", \"n3\"),\r\n attributes: {\"data-field\": \"NetUnits\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n hidden: !$scope.appInfo.paperwork.showNetUnits,\r\n aggregates: [\"sum\"],\r\n footerTemplate: \"
#=sum.toLocaleString('en-US', {minimumFractionDigits: 3})#
\"\r\n }\r\n ]\r\n },\r\n {\r\n field: \"CalcPrice\",\r\n width: 110,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"CalcPrice\", \"n3\"),\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"CalcAvgPrice\") + \"\",\r\n attributes: {\"data-field\": \"CalcPrice\", \"class\": \"tableCellDisabled\"},\r\n hidden: !$scope.appInfo.paperwork.showAvgPrice\r\n },\r\n {\r\n template: \"\",\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"BeginMeter\") + \"\",\r\n width: 60,\r\n attributes: {\"data-field\": \"BeginMeterBtn\"},\r\n hidden: !$scope.appInfo.paperwork.showBeginMeters\r\n },\r\n {\r\n template: \"\",\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"PumpTest\") + \"\",\r\n width: 60,\r\n attributes: {\"data-field\": \"PumpTestBtn\"}\r\n }\r\n ],\r\n pageable: false,\r\n sortable: false,\r\n editable: true,\r\n navigatable: true,\r\n scrollable: false,\r\n dataBinding: function (e) {\r\n var current = e.sender.current() || [];\r\n if (current[0]) {\r\n cellIndex = current.index();\r\n rowIndex = current.parent().index();\r\n }\r\n },\r\n dataBound: function (e)\r\n {\r\n $scope.setupMetersRows();\r\n },\r\n edit: function (e)\r\n {\r\n var $input = e.container.find(\"input\");\r\n var fieldName = $input.attr(\"name\");\r\n\r\n // alternative (if you don't have the name attribute in your editable):\r\n // var columnIndex = this.cellIndex(e.container);\r\n // var fieldName = this.thead.find(\"th\").eq(columnIndex).data(\"field\");\r\n\r\n if (!meterGridColIsEditable(fieldName, e.model))\r\n {\r\n $input.prop('readonly', true);\r\n //this.closeCell(); // prevent editing\r\n } else\r\n {\r\n $input.select();\r\n $input.addClass('k-cell-state-selected');\r\n }\r\n\r\n var grid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n var currentCell = $(grid.tbody.children().find(\".k-edit-cell\"));\r\n\r\n grid.current(currentCell);\r\n }\r\n };\r\n };\r\n\r\n function meterGridColIsEditable(fieldName, model)\r\n {\r\n if (fieldName === \"RtlPrice\") {\r\n if (!$scope.appInfo.paperwork.showRetailPrice)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n if (fieldName === \"EndAmount\")\r\n {\r\n if (model.DollarsEndingState !== 1)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n if (fieldName === \"NetAmount\")\r\n {\r\n if (model.DollarsNetState !== 1)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n if (fieldName === \"EndUnits\")\r\n {\r\n if (model.UnitsEndingState !== 1)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n if (fieldName === \"NetUnits\")\r\n {\r\n if (model.UnitsNetState !== 1)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n if (fieldName === \"BeginMeterBtn\")\r\n {\r\n if (model.FuelPositionUnitReading !== 1 && model.FuelPositionDollarReading !== 1)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true; // default to editable\r\n }\r\n\r\n function onGridKeydown(e)\r\n {\r\n if (e.keyCode === kendo.keys.TAB) {\r\n //check for shift key being down\r\n if (e.shiftKey) {\r\n $scope.focusPreviousEditableCell();\r\n }\r\n else {\r\n $scope.focusNextEditableCell();\r\n }\r\n }\r\n }\r\n\r\n $scope.gridInputCellOnBlur = function (dataItem, fieldName)\r\n {\r\n if (fieldName === \"RtlPrice\")\r\n {\r\n $scope.retailChange(dataItem);\r\n }\r\n\r\n if (fieldName === \"EndAmount\")\r\n {\r\n $scope.endAmountChange(dataItem);\r\n }\r\n\r\n if (fieldName === \"NetAmount\")\r\n {\r\n $scope.netAmountChange(dataItem);\r\n }\r\n\r\n if (fieldName === \"EndUnits\")\r\n {\r\n $scope.endUnitsChange(dataItem);\r\n }\r\n\r\n if (fieldName === \"NetUnits\")\r\n {\r\n $scope.netUnitsChange(dataItem);\r\n }\r\n };\r\n\r\n $scope.setupMetersRows = function ()\r\n {\r\n\r\n $(\"#metersGrid tr\").each(function (index, row)\r\n {\r\n\r\n if (index > 1)\r\n { // skip header rows\r\n var dataItem = $(\"#metersGrid\").data(\"kendoGrid\").dataItem(this);\r\n\r\n var $row = $(row);\r\n var $rowColumns = $row.find('td');\r\n\r\n $rowColumns.each(function (index, col)\r\n {\r\n var $col = $(col);\r\n var fieldName = $col.attr('data-field');\r\n if (!meterGridColIsEditable(fieldName, dataItem))\r\n {\r\n $col.addClass(\"tableCellDisabled\");\r\n $col.removeClass(\"k-editable-cell\");\r\n\r\n if (fieldName === \"BeginMeterBtn\")\r\n {\r\n $col.find('i').hide();\r\n }\r\n }\r\n\r\n //setup checkbox columns\r\n /* if (fieldName === \"BeginMeterBtn\") {\r\n $col.on(\"click\", \"input.elecChkBox\", function (e) {\r\n $scope.openBeginMeter(dataItem)\r\n });\r\n }*/\r\n\r\n $scope.setupGridColumnValidationNotificationUI($col);\r\n });\r\n\r\n }\r\n });\r\n };\r\n\r\n $scope.setupMetersGridColumns = function ()\r\n {\r\n\r\n var showDispenserNo = $scope.appInfo.paperwork.meters.some(function (meter)\r\n {\r\n return meter.DispenserNo > 0;\r\n });\r\n\r\n if (!showDispenserNo)\r\n {\r\n $scope.kendo.metersGrid.hideColumn(\"DispenserNo\");\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.showRetailPrice)\r\n {\r\n $scope.kendo.metersGrid.hideColumn(\"RtlPrice\");\r\n }\r\n };\r\n\r\n $scope.$on(\"kendoWidgetCreated\", function (event, widget)\r\n {\r\n\r\n var grid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n // the event is emitted for every widget; if we have multiple\r\n // widgets in this controller, we need to check that the event\r\n // is for the one we're interested in.\r\n\r\n if (widget === $scope.kendo.metersGrid)\r\n {\r\n grid.dataSource.data($scope.appInfo.paperwork.meters);\r\n $(\"#metersGrid\").find(\"table\").on(\"keydown\", onGridKeydown);\r\n $scope.setupMetersGridColumns();\r\n\r\n $scope.calculatePageTotals();\r\n }\r\n });\r\n\r\n $scope.setupGridColumnValidationNotificationUI = function ($col)\r\n {\r\n\r\n var fieldName = $col.attr('data-field');\r\n\r\n $col.qtip({\r\n id: \"qtip-\" + fieldName,\r\n content: {\r\n text: \"\"\r\n },\r\n position: {\r\n adjust: {\r\n x: -10, y: -10\r\n }\r\n },\r\n style: {\r\n classes: \"toolTipStyle\"\r\n }\r\n });\r\n\r\n $col.qtip('disable', true);\r\n\r\n };\r\n\r\n $scope.processGridColumnValidationNotification = function ($row, fieldName, errorMessages, warningMessages)\r\n {\r\n\r\n var idx = 0;\r\n\r\n var hasErrors = (errorMessages.length > 0);\r\n var hasWarnings = (warningMessages.length > 0);\r\n\r\n var $col = $row.find(\"[data-field='\" + fieldName + \"']\");\r\n\r\n //clear classes\r\n $col.removeClass(\"td-error\");\r\n $col.removeClass(\"td-warning\");\r\n\r\n if (hasErrors || hasWarnings)\r\n {\r\n\r\n var messageList = $(\"
\");\r\n\r\n if (hasErrors)\r\n {\r\n var errorList = $(\"
\" + localStrings.getLocalizedString(\"Error\") + \" :
\");\r\n for (idx = 0; idx < errorMessages.length; idx++)\r\n {\r\n errorList.append(\"
  • \" + errorMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(errorList);\r\n }\r\n\r\n if (hasWarnings)\r\n {\r\n var warningList = $(\"
    \" + localStrings.getLocalizedString(\"Warning\") + \" :
    \");\r\n for (idx = 0; idx < warningMessages.length; idx++)\r\n {\r\n warningList.append(\"
  • \" + warningMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(warningList);\r\n }\r\n\r\n $col.qtip('option', 'content.text', messageList);\r\n\r\n if (hasErrors)\r\n {\r\n $col.addClass(\"td-error\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-error');\r\n } else\r\n {\r\n $col.addClass(\"td-warning\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-warning');\r\n }\r\n\r\n $col.qtip('disable', false);\r\n }\r\n else\r\n {\r\n $col.qtip('disable', true);\r\n }\r\n };\r\n\r\n var meterRowValidation =\r\n {\r\n validator: function (meter, parms)\r\n {\r\n var isValid = true;\r\n\r\n var $row = $(\"#metersGrid\").data(\"kendoGrid\").tbody.find(\"tr[data-uid='\" + meter.uid + \"']\");\r\n \r\n // retail price validation\r\n if ($scope.appInfo.paperwork.showRetailPrice)\r\n {\r\n\r\n var errorRtlPrice = [], warningRtlPrice = [];\r\n \r\n // retail price errors\r\n if ((angular.isUndefinedOrNullOrEmpty(meter.RtlPrice) || meter.RtlPrice === 0) && (meter.NetAmount > 0 && meter.NetUnits > 0))\r\n {\r\n isValid = false;\r\n\r\n errorRtlPrice.push(localStrings.getLocalizedString(\"GTZeroError\"));\r\n }\r\n\r\n // retail price warnings\r\n if ($scope.appInfo.paperwork.showRetailPrice && !angular.isUndefinedOrNullOrEmpty(meter.CalcPrice) && !angular.isUndefinedOrNullOrEmpty(meter.PriorCalcPrice))\r\n {\r\n\r\n var calcTotalSales = (meter.RtlPrice * meter.NetUnits);\r\n\r\n if ((Math.abs(calcTotalSales - meter.NetAmount) > $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance) && calcTotalSales > 0 && meter.NetAmount > 0 && $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance > 0)\r\n {\r\n warningRtlPrice.push(localStrings.getLocalizedString(\"CapturedTotalOutside\"));\r\n }\r\n\r\n if ((Math.abs(meter.RtlPrice - meter.CalcPrice) > $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance) && meter.RtlPrice > 0 && meter.CalcPrice > 0 && $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance > 0)\r\n {\r\n warningRtlPrice.push(localStrings.getLocalizedString(\"CapturedRetailPrice\"));\r\n }\r\n }\r\n\r\n $scope.processGridColumnValidationNotification($row, 'RtlPrice', errorRtlPrice, warningRtlPrice);\r\n }\r\n\r\n //end units validation\r\n var errorEndUnits = [], warningEndUnits = [];\r\n if (meter.EndUnits > 0)\r\n {\r\n if (meter.EndUnits < meter.BeginUnits && $scope.appInfo.paperwork.showBeginMeters)\r\n {\r\n warningEndUnits.push(localStrings.getLocalizedString(\"UnitsRolled\"));\r\n }\r\n if (meter.EndUnits >= $scope.MaxUnits) {\r\n isValid = false;\r\n errorEndUnits.push(localStrings.getLocalizedString(\"UnitsMaxExceeded\"));\r\n }\r\n }\r\n $scope.processGridColumnValidationNotification($row, 'EndUnits', errorEndUnits, warningEndUnits);\r\n\r\n //end amount validation\r\n var errorEndAmount = [], warningEndAmount = [];\r\n if (meter.EndAmount > 0)\r\n {\r\n if (meter.EndAmount < meter.BeginAmount && $scope.appInfo.paperwork.showBeginMeters)\r\n {\r\n warningEndAmount.push(localStrings.getLocalizedString(\"UnitsRolled\"));\r\n }\r\n if (meter.EndAmount >= $scope.MaxUnits) {\r\n isValid = false;\r\n errorEndAmount.push(localStrings.getLocalizedString(\"DollarsMaxExceeded\"));\r\n }\r\n }\r\n $scope.processGridColumnValidationNotification($row, 'EndAmount', errorEndAmount, warningEndAmount);\r\n\r\n //calc price validation\r\n var errorCalcPrice = [], warningCalcPrice = [];\r\n if (!angular.isUndefinedOrNullOrEmpty(meter.CalcPrice) && !angular.isUndefinedOrNullOrEmpty(meter.PriorCalcPrice))\r\n {\r\n if (Math.abs(meter.CalcPrice) >= $scope.MaxUnits || (Math.abs(meter.CalcPrice - meter.PriorCalcPrice) > $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance) && meter.CalcPrice > 0 && meter.PriorCalcPrice > 0 && $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance > 0)\r\n {\r\n warningCalcPrice.push(localStrings.getLocalizedString(\"CalculatedPriceOutside\"));\r\n }\r\n }\r\n $scope.processGridColumnValidationNotification($row, 'CalcPrice', errorCalcPrice, warningCalcPrice);\r\n\r\n return isValid;\r\n }\r\n };\r\n\r\n $scope.validateMeters = function ()\r\n {\r\n\r\n var isValid = true;\r\n\r\n var metersGrid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n angular.forEach(metersGrid.dataSource.data(), function (meter)\r\n {\r\n isValid = isValid && meterRowValidation.validator(meter);\r\n });\r\n\r\n return isValid;\r\n };\r\n\r\n var newPWBatchLoadedListener = $rootScope.$on('event:NewPaperworkBatchLoaded', function (event, data)\r\n {\r\n if ($scope.locationInfo.sideMenuData.paperwork.meters)\r\n $scope.loadMeters();\r\n else if ($scope.locationInfo.sideMenuData.paperwork.tanks)\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkTanks/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkTanks/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n else if ($scope.locationInfo.sideMenuData.paperwork.deliveries)\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDeliveries/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDeliveries/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n else\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n });\r\n\r\n // $scope $destroy\r\n $scope.$on('$destroy', newPWBatchLoadedListener);\r\n\r\n $scope.loadMeters = function ()\r\n {\r\n $scope = this;\r\n\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.batch.SiteKey)\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n });\r\n PaperworkMetersService.loadMetersForEntry(\r\n $scope.appInfo.paperwork.batch.Key,\r\n $scope.appInfo.paperwork.context.selectedSiteObj.PCKey,\r\n $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true)\r\n ).then(function (data)\r\n {\r\n // if(data.count == 0){\r\n // TODO: No meters, do something...\r\n //\r\n // }\r\n $scope.appInfo.paperwork.meters = data.PaperworkMeters;\r\n $scope.appInfo.paperwork.priceToleranceAmount = data.PriceToleranceAmount;\r\n $scope.appInfo.paperwork.showRetailPrice = data.ShowRetailPrice;\r\n $scope.appInfo.paperwork.showEndingDollar = data.ShowEndingDollar;\r\n $scope.appInfo.paperwork.showNetDollars = data.ShowNetDollars;\r\n $scope.appInfo.paperwork.showEndingUnits = data.ShowEndingUnits;\r\n $scope.appInfo.paperwork.showNetUnits = data.ShowNetUnits;\r\n $scope.appInfo.paperwork.showAvgPrice = data.ShowAvgPrice;\r\n $scope.appInfo.paperwork.showBeginMeters = data.ShowBeginMeters;\r\n\r\n $scope.initializeMetersGrid();\r\n\r\n $scope.metersLoaded = true;\r\n\r\n if ($scope.appInfo.paperwork.meters.length > 0) {\r\n $scope.metersEditable = !(($scope.appInfo.paperwork.context.lockPaperworkAfterDru && $scope.appInfo.paperwork.meters[0].DRUPosted) || $scope.appInfo.paperwork.meters[0].Status === 1);\r\n }\r\n\r\n //If entering a new paperwork batch create the default header form in the database\r\n //if (!$scope.appInfo.paperwork.viewOnly && $scope.metersEditable && $scope.appInfo.paperwork.form.PaperworkBatchKey === 0) {\r\n // var paperworkMeterHeader =\r\n // {\r\n // Key: $scope.appInfo.paperwork.meters[0].FuelMtrKey,\r\n // SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n // SiteDesc: $scope.appInfo.paperwork.context.selectedSiteObj.SiteDesc,\r\n // ProfCtrKey: $scope.appInfo.paperwork.context.selectedSiteObj.PCKey,\r\n // PaperworkBatchKey: $scope.appInfo.paperwork.batch.Key,\r\n // PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n // UserName: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n // SourceKey: 0,\r\n // Ts: $scope.appInfo.paperwork.meters[0].HeaderTimeStamp,\r\n // AppKey: $scope.locationInfo.sideMenuData.paperwork.meters.Key\r\n // };\r\n\r\n //Pass in default meters data since the grid has not yet been modified\r\n //PaperworkMetersService.savePaperworkMeters(paperworkMeterHeader, $scope.appInfo.paperwork.meters, true);\r\n //}\r\n\r\n //$scope.metersLoaded = true;\r\n });\r\n };\r\n\r\n var PageStage = $rootScope.$on('event:PageStage', function (event, args)\r\n {\r\n if (args === 'DREGM' && !$scope.appInfo.paperwork.viewOnly && $scope.metersEditable && $scope.metersGridDS.hasChanges())\r\n {\r\n $scope.saveMeters('', false, false);\r\n } \r\n });\r\n $scope.$on('$destroy', PageStage);\r\n\r\n $scope.next = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.metersEditable && $scope.metersGridDS.hasChanges())\r\n {\r\n $scope.saveMeters(path, false, false);\r\n } else {\r\n $scope.goTo(setupNav.navigateToPage(path, $scope.appInfo.paperwork.apps, $scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n }\r\n };\r\n\r\n $scope.previous = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.metersEditable && $scope.metersGridDS.hasChanges())\r\n {\r\n $scope.saveMeters(path, false, false, true);\r\n } else {\r\n $scope.goTo(setupNav.navigateToPage(path, $scope.appInfo.paperwork.apps, $scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, true));\r\n }\r\n };\r\n\r\n $scope.close = function ()\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.metersEditable)\r\n {\r\n $scope.saveMeters(\"\", false, false);\r\n } else\r\n {\r\n $scope.goTo(\"/Paperwork/EnterPaperwork/\");\r\n }\r\n\r\n };\r\n\r\n $scope.submit = function ()\r\n {\r\n $scope.saveMeters(\"\", true, false);\r\n };\r\n\r\n $scope.processSubmit = function (submit) {\r\n\r\n var submitPaperworkCmdParms =\r\n {\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n EmailAddress: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SubmitPaperwork: submit,\r\n PreviouslySubmitted: $scope.appInfo.paperwork.batch.HasBeenSubmitted\r\n };\r\n\r\n PaperworkService.GetPaperworkBatchErrorWarning(submitPaperworkCmdParms).then(function (data) {\r\n //If warnings - show confirm dialog\r\n if (data.HasWarnings) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Warnings[0])) {\r\n $scope.notifier.show(data.Warnings[0], \"warning\");\r\n\r\n var yes = function () {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n };\r\n\r\n $scope.modalifier.confirm(data.Warnings[0] + \"
    \" + localStrings.getLocalizedString(\"WishToContinue\"), yes);\r\n }\r\n }\r\n else { \r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n }\r\n });\r\n };\r\n\r\n $scope.submitPaperwork = function (submit)\r\n {\r\n var fuelMetersAppInfo = $scope.appInfo.paperwork.apps[0];\r\n\r\n //If we have fuelMeters and fuelMeters are required, but not saved; then throw error\r\n if (fuelMetersAppInfo.HasData === 0 && fuelMetersAppInfo.IsRequired !== 0)\r\n {\r\n $timeout(function () {\r\n $scope.modalifier.showSavedError();\r\n }, 100);\r\n return;\r\n }\r\n\r\n $scope.processSubmit(submit);\r\n };\r\n\r\n $scope.saveMeters = function (path, submit, close, isPrevious)\r\n {\r\n if (!$scope.validateMeters()) {\r\n return;\r\n }\r\n \r\n $scope.resetDirtyFlags($scope.metersForm);\r\n isPrevious = isPrevious ? isPrevious: false;\r\n\r\n var paperworkMeterHeader =\r\n {\r\n Key: $scope.appInfo.paperwork.meters[0].FuelMtrKey,\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n SiteDesc: $scope.appInfo.paperwork.context.selectedSiteObj.SiteDesc,\r\n ProfCtrKey: $scope.appInfo.paperwork.context.selectedSiteObj.PCKey,\r\n PaperworkBatchKey: $scope.appInfo.paperwork.batch.Key,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n UserName: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SourceKey: 0,\r\n Ts: $scope.appInfo.paperwork.meters[0].HeaderTimeStamp,\r\n AppKey: $scope.locationInfo.sideMenuData.paperwork.meters.Key\r\n };\r\n\r\n angular.copy($scope.metersGridDS.data().toJSON(), $scope.appInfo.paperwork.meters);\r\n\r\n // Call these functions to translate the french numeric value to a actual number value.\r\n PaperworkMetersService.updateMeters($scope.appInfo.paperwork.meters);\r\n \r\n PaperworkMetersService.savePaperworkMeters(paperworkMeterHeader, $scope.appInfo.paperwork.meters).then(function (data) {\r\n var grid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n $scope.appInfo.paperwork.meters = data.PaperworkMeters;\r\n if (grid) {\r\n grid.dataSource.data(data.PaperworkMeters);\r\n\r\n $scope.validateMeters(); // call validate to re add any warnings after save\r\n }\r\n\r\n $scope.appInfo.paperwork.apps[0].HasData = -1;\r\n\r\n if (submit) {\r\n $scope.submitPaperwork(true);\r\n return;\r\n }\r\n if (close) {\r\n $scope.submitPaperwork(false);\r\n return;\r\n }\r\n if (path.length > 0){\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, false, isPrevious));\r\n }\r\n });\r\n };\r\n\r\n $scope.retailChange = function (dataItem)\r\n {\r\n PaperworkMetersService.netAmountCalc(dataItem);\r\n PaperworkMetersService.calcPerUnit(dataItem,\r\n $scope.appInfo.paperwork.priceToleranceAmount,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceToRetail,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceOverDay);\r\n $scope.calculatePageTotals();\r\n };\r\n\r\n $scope.endAmountChange = function (dataItem)\r\n {\r\n PaperworkMetersService.calculateNetAmountFromEnd(dataItem);\r\n PaperworkMetersService.calcPerUnit(dataItem,\r\n $scope.appInfo.paperwork.priceToleranceAmount,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceToRetail,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceOverDay,\r\n $scope.appInfo.paperwork.showRetailPrice);\r\n $scope.calculatePageTotals();\r\n };\r\n\r\n $scope.netAmountChange = function (dataItem)\r\n {\r\n PaperworkMetersService.calcPerUnit(dataItem,\r\n $scope.appInfo.paperwork.priceToleranceAmount,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceToRetail,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceOverDay,\r\n $scope.appInfo.paperwork.showRetailPrice);\r\n $scope.calculatePageTotals();\r\n };\r\n\r\n $scope.netUnitsChange = function (dataItem)\r\n {\r\n PaperworkMetersService.netAmountCalc(dataItem);\r\n PaperworkMetersService.calcPerUnit(dataItem,\r\n $scope.appInfo.paperwork.priceToleranceAmount,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceToRetail,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceOverDay,\r\n $scope.appInfo.paperwork.showRetailPrice);\r\n $scope.calculatePageTotals();\r\n };\r\n\r\n $scope.endUnitsChange = function (dataItem)\r\n {\r\n PaperworkMetersService.calculateNetUnitsFromEnd(dataItem);\r\n PaperworkMetersService.netAmountCalc(dataItem);\r\n PaperworkMetersService.calcPerUnit(dataItem,\r\n $scope.appInfo.paperwork.priceToleranceAmount,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceToRetail,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceOverDay,\r\n $scope.appInfo.paperwork.showRetailPrice);\r\n $scope.calculatePageTotals();\r\n };\r\n\r\n $scope.calculatePageTotals = function ()\r\n {\r\n var metersGrid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n $scope.appInfo.paperwork.totalAmount = PaperworkMetersService.calculatePageAmountTotals(metersGrid.dataSource.data());\r\n $scope.appInfo.paperwork.totalUnits = PaperworkMetersService.calculatePageUnitTotals(metersGrid.dataSource.data());\r\n\r\n // update the grid and make sure it has the latest data\r\n metersGrid.dataSource.data(metersGrid.dataSource.data());\r\n };\r\n\r\n $scope.focusNextEditableCell = function () {\r\n var metersGrid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n if (!isNaN(cellIndex)) {\r\n var current = metersGrid.current(metersGrid.tbody.children().eq(rowIndex).children().eq(cellIndex));\r\n\r\n rowIndex = cellIndex = null;\r\n \r\n if (current.hasClass(\"k-editable-cell\"))\r\n {\r\n var nextCell = current.nextAll(\".k-editable-cell\");\r\n if (!nextCell[0])\r\n {\r\n //search the next row\r\n nextCell = current.parent().next().children(\".k-editable-cell:first\");\r\n }\r\n metersGrid.current(nextCell);\r\n metersGrid.editCell(nextCell[0]);\r\n }\r\n }\r\n };\r\n\r\n $scope.focusPreviousEditableCell = function () {\r\n var metersGrid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n if (!isNaN(cellIndex)) {\r\n var current = metersGrid.current(metersGrid.tbody.children().eq(rowIndex).children().eq(cellIndex));\r\n\r\n rowIndex = cellIndex = null;\r\n\r\n if (current.hasClass(\"k-editable-cell\")) {\r\n var nextCell = current.prevAll(\".k-editable-cell\");\r\n if (!nextCell[0]) {\r\n //search the previous row\r\n nextCell = current.parent().prev().children(\".k-editable-cell:last\");\r\n }\r\n metersGrid.current(nextCell);\r\n metersGrid.editCell(nextCell[0]);\r\n }\r\n }\r\n };\r\n\r\n $scope.openBeginMeter = function (dataItem)\r\n {\r\n \r\n $scope.modalInfo.dataItem = dataItem;\r\n $scope.modalInfo.beginAmount = dataItem.BeginAmount;\r\n $scope.modalInfo.beginUnits = dataItem.BeginUnits;\r\n $scope.modalInfo.useBeginUnits = (dataItem.FuelPositionUnitReading === 1);\r\n $scope.modalInfo.useBeginAmount = (dataItem.FuelPositionDollarReading === 1);\r\n $scope.modalInfo.type = 0;\r\n $scope.modalInfo.header = localStrings.getLocalizedString(\"BeginMeter\");\r\n $scope.modalInfo.shown = true;\r\n };\r\n\r\n $scope.openPumpTest = function (dataItem)\r\n {\r\n $scope.modalInfo.dataItem = dataItem;\r\n $scope.modalInfo.beginAmount = dataItem.TestAmount;\r\n $scope.modalInfo.beginUnits = dataItem.TestUnits;\r\n $scope.modalInfo.useBeginUnits = true;\r\n $scope.modalInfo.useBeginAmount = true;\r\n $scope.modalInfo.type = 1;\r\n $scope.modalInfo.header = localStrings.getLocalizedString(\"PumpTest\");\r\n $scope.modalInfo.shown = true;\r\n };\r\n\r\n $scope.saveModalValues = function ()\r\n {\r\n if ($scope.modalInfo.beginAmount < 0 || $scope.modalInfo.beginUnits < 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"GTZeroError2\"), 'error');\r\n return;\r\n }\r\n if ($scope.modalInfo.beginUnits >= $scope.MaxUnits) {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"UnitsMaxExceeded\"), 'error');\r\n return;\r\n }\r\n if ($scope.modalInfo.beginAmount >= $scope.MaxUnits) {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"DollarsMaxExceeded\"), 'error');\r\n return;\r\n }\r\n\r\n switch ($scope.modalInfo.type)\r\n {\r\n case 0:\r\n $scope.modalInfo.dataItem.BeginAmountOverride =\r\n ($scope.modalInfo.dataItem.BeginAmount === $scope.modalInfo.beginAmount);\r\n $scope.modalInfo.dataItem.BeginAmount = $scope.modalInfo.beginAmount;\r\n $scope.modalInfo.dataItem.BeginUnitsOverride =\r\n ($scope.modalInfo.dataItem.BeginUnits === $scope.modalInfo.beginUnits);\r\n $scope.modalInfo.dataItem.BeginUnits = $scope.modalInfo.beginUnits;\r\n $scope.endAmountChange($scope.modalInfo.dataItem);\r\n $scope.endUnitsChange($scope.modalInfo.dataItem);\r\n break;\r\n\r\n case 1:\r\n $scope.modalInfo.dataItem.TestAmount = $scope.modalInfo.beginAmount;\r\n $scope.modalInfo.dataItem.TestUnits = $scope.modalInfo.beginUnits;\r\n $scope.calculatePageTotals();\r\n break;\r\n }\r\n\r\n $scope.modalInfo = {};\r\n $scope.modalInfo.shown = false;\r\n };\r\n })\r\n .controller('enterPaperworkTanksCtrl', function ($scope, $rootScope, $routeParams, PaperworkService, $filter, $timeout, PaperworkTanksService,\r\n $location, WebFunctions, validatorSvc, templates, localStrings, globalizationSvc, setupNav)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n\r\n $scope.appInfo.paperwork.paperworkKey = 0;\r\n $scope.modalInfo = {};\r\n $scope.tanksLoaded = false;\r\n $scope.postedReadingsExist = false;\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler()\r\n {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n $scope.appInfo = $scope.appInfo || {};\r\n\r\n $scope.appInfo.paperwork.viewOnly = $location.$$path.indexOf('/ViewPaperworkTanks/') > -1;\r\n if ($routeParams.paperworkKey)\r\n {\r\n $scope.appInfo.paperwork.paperworkKey = $routeParams.paperworkKey;\r\n }\r\n $scope.appInfo.paperwork.NewOSComments = '';\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n $scope.appInfo.paperwork.batch = {};\r\n $scope.appInfo.paperwork.tanks = [];\r\n $scope.appInfo.paperwork.postedTanks = [];\r\n\r\n if (!$scope.appInfo.paperwork.context)\r\n {\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true).then(\r\n function (data)\r\n {\r\n $scope.appInfo.paperwork.context = {};\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n }\r\n );\r\n }\r\n\r\n if ($scope.appInfo.paperwork.paperworkKey > 0)\r\n {\r\n //We are loading a known existing paperwork batch\r\n PaperworkService.OpenPaperworkBatchByKey(\r\n $scope.appInfo.paperwork.paperworkKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n $scope.appInfo.paperwork.viewOnly\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n\r\n // resolve if this is the first or last page\r\n var res = setupNav.firstLastPage('DREGS',$scope.appInfo.paperwork.apps);\r\n $scope.locationInfo.sideMenuData.isFirstPage = res.isFirstPage;\r\n $scope.locationInfo.sideMenuData.isLastPage = res.isLastPage;\r\n\r\n $rootScope.$broadcast('event:PaperworkLoaded', $scope.appInfo.paperwork.viewOnly, $scope.appInfo.paperwork.paperworkKey);\r\n\r\n var nextApp = true;\r\n angular.forEach($scope.appInfo.paperwork.apps, function (app, index)\r\n {\r\n if (app.MenuCode === 'DREGS')\r\n {\r\n $scope.loadTanks(false);\r\n nextApp = false;\r\n }\r\n });\r\n if (nextApp)\r\n {\r\n $scope.goTo(setupNav.navigateToPage('DREGS',$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n }\r\n }, function ()\r\n {\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n });\r\n } else\r\n {\r\n //todo: goback...\r\n }\r\n $scope.locationInfo.sideMenuData.pwSubMenu = '2';\r\n $scope.appInfo.paperwork.tankIndex = 0;\r\n };\r\n\r\n var newPWBatchLoadedListener = $rootScope.$on('event:NewPaperworkBatchLoaded', function (event, data)\r\n {\r\n if ($scope.locationInfo.sideMenuData.paperwork.tanks)\r\n $scope.loadTanks(false);\r\n else\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDeliveries/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDeliveries/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n });\r\n\r\n // $scope $destroy\r\n $scope.$on('$destroy', newPWBatchLoadedListener);\r\n\r\n var gridColEditorInput = function (container, options)\r\n {\r\n var fieldName = \"'\" + options.field + \"'\";\r\n\r\n var required = $(container).attr('required'); // field is required\r\n\r\n // For some browsers, `attr` is undefined; for others,\r\n // `attr` is false. Check for both.\r\n if (typeof required !== typeof undefined && required !== false)\r\n {\r\n $('')\r\n .appendTo(container)\r\n .kendoNumericTextBox({\r\n decimals: 2,\r\n format: \"#\",\r\n max: 100000000,\r\n min: 0,\r\n spinners: false,\r\n selectOnFocus: true\r\n });\r\n } else\r\n {\r\n $('')\r\n .appendTo(container)\r\n .kendoNumericTextBox({\r\n decimals: 2,\r\n format: \"#\",\r\n max: 100000000,\r\n min: 0,\r\n spinners: false,\r\n selectOnFocus: true\r\n });\r\n }\r\n\r\n };\r\n\r\n var gridColNumber = function (field, format)\r\n {\r\n return '';\r\n };\r\n\r\n var partialUnitsEditor = function (container, options)\r\n {\r\n $(\"\")\r\n\r\n .appendTo(container)\r\n .kendoComboBox({\r\n id: \"partialUnits\",\r\n dataSource: {\r\n data: $scope.appInfo.paperwork.partialUnits\r\n },\r\n filter: \"contains\",\r\n dataTextField: localStrings.getLocalizedString(\"Key\"),\r\n dataValueField: \"Value\",\r\n change: function (e)\r\n {\r\n\r\n var selectionElement = $(e.sender.element[0]).parent().find(\".k-dropdown-wrap\");\r\n\r\n // check if valid\r\n if ($(e.sender.element[0]).hasClass(\"k-invalid\"))\r\n {\r\n selectionElement.addClass(\"k-selection-invalid\");\r\n } else\r\n {\r\n selectionElement.removeClass(\"k-selection-invalid\");\r\n\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n\r\n var selectedRow = $(\".k-grid-edit-row\");\r\n //Get the item from the grid\r\n var selectedRowData = grid.dataItem(selectedRow);\r\n\r\n if (options.field === \"PartialUnits\")\r\n {\r\n $scope.calculateTankValues(selectedRowData);\r\n } else\r\n {\r\n $scope.calculateWaterVolumeValues(selectedRowData);\r\n }\r\n }\r\n\r\n if (this.value() && this.selectedIndex === -1)\r\n {\r\n this.value('');\r\n this._filterSource({\r\n value: \"\",\r\n field: this.options.dataTextField,\r\n operator: \"contains\"\r\n });\r\n return;\r\n }\r\n },\r\n select: function (e)\r\n {\r\n\r\n var dataItem = this.dataItem(e.item.index());\r\n }\r\n });\r\n\r\n $('').appendTo(container);\r\n\r\n };\r\n\r\n function getPartialDescFromValue(dataItem)\r\n {\r\n return $scope.appInfo.paperwork.partialUnits.find({Value: dataItem.PartialUnits}).Key;\r\n }\r\n\r\n //If No Reading checkbox is selected ,set fields to 0\r\n $scope.noReadingChkClick = function (dataItem) {\r\n var modelRow = $(\"#tanksGrid\").data(\"kendoGrid\").dataSource.getByUid(dataItem.uid);\r\n\r\n if (!dataItem.NoReading) { \r\n modelRow.set('NoReading', true);\r\n modelRow.set('LargeUnits', 0);\r\n modelRow.set('SmallUnits', 0);\r\n modelRow.set('Quantity', 0);\r\n modelRow.set('WaterSmallUnit', 0);\r\n modelRow.set('WaterQuantity', 0);\r\n }\r\n };\r\n\r\n $scope.initializeTanksGrid = function ()\r\n {\r\n\r\n $scope.tanksGridDS = new kendo.data.DataSource({\r\n schema: {\r\n model: {\r\n fields: {\r\n TankNo: {type: \"number\", editable: false},\r\n ProductId: {type: \"string\", editable: false},\r\n ProductDescription: {type: \"string\", editable: false},\r\n NoReading: {type: \"boolean\"},\r\n LargeUnits: {type: \"number\"},\r\n SmallUnits: {type: \"number\"},\r\n PartialUnits: {type: \"number\"},\r\n Quantity: {type: \"number\"},\r\n WaterSmallUnits: {type: \"number\"},\r\n WaterPartialUnits: {type: \"number\"},\r\n WaterQuantity: {type: \"number\"},\r\n Temperature: {type: \"number\"},\r\n NetQuantity: {type: \"number\"},\r\n Electronic: {type: \"boolean\"},\r\n Depth: {type: \"number\"}\r\n }\r\n }\r\n },\r\n data: $scope.appInfo.paperwork.tanks,\r\n batch: true\r\n });\r\n\r\n $scope.tanksGridOptions = {\r\n dataSource: $scope.tanksGridDS,\r\n columns: [\r\n {\r\n title: localStrings.getLocalizedString(\"Tanks\"),\r\n columns: [\r\n {\r\n field: \"TankNo\",\r\n title: localStrings.getLocalizedString(\"No\"),\r\n width: 40,\r\n attributes: {\"data-field\": \"TankNo\", \"class\": \"tableCellDisabled\"},\r\n template: \"#=TankNo#\"\r\n },\r\n {\r\n field: \"ProductId\",\r\n title: localStrings.getLocalizedString(\"Product\"),\r\n width: 65,\r\n attributes: {\"data-field\": \"ProductId\", \"class\": \"tableCellDisabled description\"},\r\n template: \"#=ProductId#\"\r\n },\r\n {\r\n field: \"ProductDescription\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {\r\n \"data-field\": \"ProductDescription\",\r\n \"class\": \"tableCellDisabled description\"\r\n },\r\n template: \"#=ProductDescription#\" \r\n }\r\n ]\r\n },\r\n {\r\n field: \"NoReading\",\r\n width: 40,\r\n template: \"\",\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"NoRdg\") + \"\",\r\n attributes: {\"data-field\": \"NoReading\", \"class\": \"k-editable-cell grid-checkbox\", \"ng-click\":\"noReadingChkClick(dataItem);\"}\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Fuel\"),\r\n columns: [\r\n {\r\n field: \"LargeUnits\",\r\n width: 50,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"LargeUnits\", \"n2\"),\r\n headerTemplate: \"ft.m.\",\r\n attributes: {\"data-field\": \"LargeUnits\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"SmallUnits\",\r\n width: 50,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"SmallUnits\", \"n2\"),\r\n headerTemplate: \"in.cm.\",\r\n attributes: {\"data-field\": \"SmallUnits\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"PartialUnits\",\r\n title: localStrings.getLocalizedString(\"Partial\"),\r\n width: 70,\r\n editor: partialUnitsEditor,\r\n template: function (dataItem)\r\n {\r\n return getPartialDescFromValue(dataItem);\r\n },\r\n attributes: {\"data-field\": \"PartialUnits\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"Quantity\",\r\n title: localStrings.getLocalizedString(\"Qty\"),\r\n width: 120,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"Quantity\", \"n2\"),\r\n attributes: {\"data-field\": \"Quantity\", \"class\": \"k-editable-cell\"}\r\n }\r\n ]\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Water\"),\r\n columns: [\r\n {\r\n field: \"WaterSmallUnits\",\r\n width: 50,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"WaterSmallUnits\", \"n\"),\r\n headerTemplate: \"in.cm.\",\r\n attributes: {\"data-field\": \"WaterSmallUnits\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"WaterPartialUnits\", title: localStrings.getLocalizedString(\"Partial\"), width: 70, editor: partialUnitsEditor,\r\n template: function (dataItem)\r\n {\r\n return getPartialDescFromValue(dataItem);\r\n },\r\n attributes: {\"data-field\": \"WaterPartialUnits\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"WaterQuantity\",\r\n title: localStrings.getLocalizedString(\"Qty\"),\r\n width: 120,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"WaterQuantity\", \"n2\"),\r\n attributes: {\"data-field\": \"WaterQuantity\", \"class\": \"k-editable-cell\"}\r\n }\r\n ]\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"TempCorrection\"),\r\n columns: [\r\n {\r\n field: \"Temperature\",\r\n width: 50,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"Temperature\", \"n\"),\r\n headerTemplate: \"°F°C\",\r\n attributes: {\"data-field\": \"Temperature\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"NetQuantity\",\r\n title: localStrings.getLocalizedString(\"Net\"),\r\n width: 50,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"NetQuantity\", \"n2\"),\r\n attributes: {\"data-field\": \"NetQuantity\", \"class\": \"k-editable-cell\"}\r\n }\r\n ]\r\n },\r\n {\r\n field: \"Electronic\",\r\n width: 40,\r\n template: \"\",\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"ElectRdg\") + \"\",\r\n attributes: {\"data-field\": \"Electronic\", \"class\": \"k-editable-cell grid-checkbox\"}\r\n }\r\n\r\n ],\r\n pageable: false,\r\n sortable: false,\r\n editable: true,\r\n scrollable: false,\r\n navigatable: true,\r\n dataBound: function (e)\r\n {\r\n $timeout(function ()\r\n {\r\n $scope.setupTankRows();\r\n },100);\r\n\r\n },\r\n edit: function (e)\r\n {\r\n var $input = e.container.find(\"input\");\r\n var fieldName = $input.attr(\"name\");\r\n\r\n $input.select();\r\n $input.addClass('k-cell-state-selected');\r\n \r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n var currentCell = $(grid.tbody.children().find(\".k-edit-cell\"));\r\n\r\n grid.current(currentCell);\r\n }\r\n\r\n };\r\n }; \r\n \r\n $scope.$on(\"kendoWidgetCreated\", function (event, widget)\r\n {\r\n\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n\r\n // the event is emitted for every widget; if we have multiple\r\n // widgets in this controller, we need to check that the event\r\n // is for the one we're interested in.\r\n\r\n if (widget === $scope.kendo.tanksGrid)\r\n {\r\n grid.dataSource.data($scope.appInfo.paperwork.tanks);\r\n\r\n $(\"#tanksGrid\").find(\"table\").on(\"keydown\", onGridKeydown);\r\n\r\n $scope.setupTankGridColumns(grid);\r\n\r\n }\r\n });\r\n \r\n $scope.setupTankRows = function ()\r\n {\r\n\r\n $(\"#tanksGrid tr\").each(function (index, row)\r\n {\r\n\r\n if (index > 1)\r\n { // skip header rows\r\n var dataItem = $(\"#tanksGrid\").data(\"kendoGrid\").dataItem(this);\r\n\r\n var $row = $(row);\r\n var $rowColumns = $row.find('td');\r\n\r\n $rowColumns.each(function (index, col)\r\n {\r\n var $col = $(col);\r\n var fieldName = $col.attr('data-field');\r\n var $inputElm;\r\n\r\n $scope.setupGridColumnValidationNotificationUI($col);\r\n\r\n //setup checkbox columns\r\n if (fieldName === \"Electronic\")\r\n {\r\n //check to see if grid is editable\r\n if ($(\"#tanksGrid\").attr(\"k-editable\") === \"false\")\r\n {\r\n $col.removeClass(\"k-editable-cell\");\r\n\r\n $inputElm = $col.find(\"input\");\r\n $inputElm.attr(\"disabled\", true);\r\n\r\n } else\r\n {\r\n $col.on(\"change\", \"input.elecChkBox\", function (e)\r\n {\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\"),\r\n dataItem = grid.dataItem($(e.target).closest(\"tr\"));\r\n\r\n dataItem.set(\"Electronic\", this.checked);\r\n });\r\n }\r\n }\r\n\r\n if (fieldName === \"NoReading\")\r\n {\r\n //check to see if grid is editable\r\n if ($(\"#tanksGrid\").attr(\"k-editable\") === \"false\")\r\n {\r\n $col.removeClass(\"k-editable-cell\");\r\n\r\n $inputElm = $col.find(\"input\");\r\n $inputElm.attr(\"disabled\", true);\r\n\r\n } else\r\n {\r\n $col.on(\"change\", \"input.noReadChkBox\", function (e)\r\n {\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\"),\r\n dataItem = grid.dataItem($(e.target).closest(\"tr\"));\r\n\r\n });\r\n }\r\n }\r\n });\r\n\r\n }\r\n });\r\n };\r\n\r\n function onGridKeydown(e)\r\n {\r\n if (e.keyCode === kendo.keys.TAB)\r\n {\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n\r\n var current = grid.current();\r\n\r\n if (!current.hasClass(\"k-editable-cell\"))\r\n {\r\n var nextCell = current.nextAll(\".k-editable-cell\");\r\n if (!nextCell[0])\r\n {\r\n //search the next row\r\n var nextRow = current.parent().next();\r\n nextCell = current.parent().next().children(\".k-editable-cell:first\");\r\n }\r\n grid.current(nextCell);\r\n grid.editCell(nextCell[0]);\r\n }\r\n }\r\n }\r\n\r\n $scope.setupTankGridColumns = function (grid) {\r\n\r\n if (!($scope.appInfo.paperwork.useLargeUnits && !$scope.appInfo.paperwork.quantityOnly)) {\r\n grid.hideColumn(\"LargeUnits\");\r\n }\r\n\r\n if ($scope.appInfo.paperwork.quantityOnly) {\r\n grid.hideColumn(\"SmallUnits\");\r\n grid.hideColumn(\"PartialUnits\");\r\n }\r\n\r\n if (!($scope.appInfo.paperwork.trackWaterLevels && !$scope.appInfo.paperwork.quantityOnly)) {\r\n grid.hideColumn(\"WaterSmallUnits\");\r\n grid.hideColumn(\"WaterPartialUnits\");\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.trackWaterLevels) {\r\n grid.hideColumn(\"WaterQuantity\");\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.useTempCorrections) {\r\n grid.hideColumn(\"Temperature\");\r\n grid.hideColumn(\"NetQuantity\");\r\n }\r\n\r\n };\r\n\r\n $scope.gridInputCellOnBlur = function (dataItem, fieldName)\r\n {\r\n if (fieldName === \"LargeUnits\")\r\n {\r\n dataItem.LargeUnits = (!dataItem.LargeUnits || dataItem.LargeUnits === \"\") ? 0 : dataItem.LargeUnits;\r\n $scope.calculateTankValues(dataItem);\r\n }\r\n\r\n if (fieldName === \"SmallUnits\")\r\n {\r\n dataItem.SmallUnits = (!dataItem.SmallUnits || dataItem.SmallUnits === \"\") ? 0 : dataItem.SmallUnits;\r\n $scope.calculateTankValues(dataItem);\r\n }\r\n\r\n if (fieldName === \"Quantity\")\r\n {\r\n dataItem.Quantity = (!dataItem.Quantity || dataItem.Quantity === \"\") ? 0 : dataItem.Quantity;\r\n $scope.calculateVolumeForTemperature(dataItem);\r\n }\r\n\r\n if (fieldName === \"WaterSmallUnits\") \r\n {\r\n dataItem.WaterSmallUnits = (!dataItem.WaterSmallUnits || dataItem.WaterSmallUnits === \"\") ? 0 : dataItem.WaterSmallUnits;\r\n $scope.calculateWaterVolumeValues(dataItem);\r\n }\r\n\r\n if (fieldName === \"WaterQuantity\")\r\n {\r\n dataItem.WaterQuantity = (!dataItem.WaterQuantity || dataItem.WaterQuantity === \"\") ? 0 : dataItem.WaterQuantity;\r\n $scope.calculateVolumeForTemperature(dataItem);\r\n }\r\n\r\n if (fieldName === \"Temperature\")\r\n {\r\n dataItem.Temperature = (!dataItem.Temperature || dataItem.Temperature === \"\") ? 0 : dataItem.Temperature;\r\n $scope.calculateVolumeForTemperature(dataItem);\r\n }\r\n\r\n\r\n };\r\n\r\n $scope.calculateTankValues = function (dataItem)\r\n {\r\n var modelRow = $(\"#tanksGrid\").data(\"kendoGrid\").dataSource.getByUid(dataItem.uid); \r\n\r\n if (dataItem.LargeUnits !== 0 || dataItem.SmallUnits !== 0 || dataItem.Quantity !== 0 || dataItem.WaterSmallUnits !== 0 || dataItem.WaterQuantity !== 0 || dataItem.Temperature !== 0) {\r\n modelRow.set('NoReading', false);\r\n }\r\n \r\n var depth = PaperworkTanksService.calculateTankDepth(dataItem,\r\n $scope.appInfo.paperwork.metric);\r\n\r\n modelRow.set('Depth', depth);\r\n\r\n var quantity = PaperworkTanksService.getVolumeFromTankChart(dataItem,\r\n $scope.appInfo.paperwork.tankCharts);\r\n\r\n modelRow.set('Quantity', quantity);\r\n\r\n $scope.calculateVolumeForTemperature(dataItem);\r\n };\r\n\r\n $scope.calculateVolumeForTemperature = function (dataItem)\r\n {\r\n var modelRow = $(\"#tanksGrid\").data(\"kendoGrid\").dataSource.getByUid(dataItem.uid);\r\n\r\n var netQuantity = PaperworkTanksService.adjustVolumeForTemperature($scope.appInfo.paperwork.useTempCorrections,\r\n dataItem, $scope.appInfo.paperwork.tempCharts); \r\n\r\n if (dataItem.LargeUnits !== 0 || dataItem.SmallUnits !== 0 || dataItem.Quantity !== 0 || dataItem.WaterSmallUnits !== 0 || dataItem.WaterQuantity !== 0 ) {\r\n modelRow.set('NoReading', false);\r\n }\r\n\r\n };\r\n\r\n $scope.calculateWaterVolumeValues = function (dataItem)\r\n {\r\n var modelRow = $(\"#tanksGrid\").data(\"kendoGrid\").dataSource.getByUid(dataItem.uid);\r\n\r\n if (dataItem.LargeUnits !== 0 || dataItem.SmallUnits !== 0 || dataItem.Quantity !== 0 || dataItem.WaterSmallUnits !== 0 || dataItem.WaterQuantity !== 0) {\r\n modelRow.set('NoReading', false);\r\n }\r\n\r\n var depth = PaperworkTanksService.calculateWaterDepth(dataItem);\r\n\r\n modelRow.set('WaterDepth', depth);\r\n\r\n var quantity = PaperworkTanksService.getWaterVolumeFromTankChart(dataItem,\r\n $scope.appInfo.paperwork.tankCharts);\r\n\r\n modelRow.set('WaterQuantity', quantity);\r\n\r\n $scope.calculateVolumeForTemperature(dataItem);\r\n\r\n };\r\n\r\n $scope.validateTankOverShort = function (referenceTank)\r\n {\r\n var hasWarning = false;\r\n\r\n //First check to see if we even care.\r\n if (!$scope.appInfo.paperwork.UseOSWarnings)\r\n {\r\n return {\r\n HasWarning: false,\r\n Min: 0,\r\n Max: 0\r\n };\r\n }\r\n\r\n //Figure out what the base tank is going to be.\r\n if (referenceTank.InventoryTankNo !== referenceTank.TankNo)\r\n {\r\n for (var x = 0; x < $scope.appInfo.paperwork.tanks.length; x++)\r\n {\r\n if ($scope.appInfo.paperwork.tanks[x].TankNo === referenceTank.InventoryTankNo)\r\n {\r\n referenceTank = $scope.appInfo.paperwork.tanks[x];\r\n break;\r\n }\r\n }\r\n }\r\n //Then find the tolerance\r\n var tolerance = (referenceTank.EndQty * ($scope.appInfo.paperwork.OSWarningPct / 100)) + $scope.appInfo.paperwork.OSWarningUnits;\r\n var min = referenceTank.EndQty - tolerance;\r\n var max = referenceTank.EndQty + tolerance;\r\n //Find the total value of all tanks manifolded togather then check the tolerances.\r\n var totalValue = $scope.calculateTankEndQuantity(referenceTank);\r\n hasWarning = (totalValue < min || totalValue > max) && !referenceTank.NoReading;\r\n\r\n if (hasWarning)\r\n {\r\n $scope.tankCommentIsRequired = true;\r\n }\r\n \r\n return {\r\n HasWarning: hasWarning,\r\n Min: min,\r\n Max: max\r\n } ;\r\n };\r\n\r\n $scope.calculateTankEndQuantity = function (tank)\r\n {\r\n if (tank.TankNo === tank.InventoryTankNo)\r\n return tank.Quantity;\r\n var inventoryTankNo = tank.InventoryTankNo;\r\n var quantity = 0.00;\r\n for (var x = 0; x < $scope.appInfo.paperwork.tanks.length; x++)\r\n {\r\n if ($scope.appInfo.paperwork.tanks[x].InventoryTankNo === inventoryTankNo)\r\n quantity += $scope.appInfo.paperwork.tanks[x].Quantity;\r\n }\r\n return quantity;\r\n };\r\n\r\n $scope.setupGridColumnValidationNotificationUI = function ($col)\r\n {\r\n\r\n var fieldName = $col.attr('data-field');\r\n\r\n $col.qtip({\r\n id: \"qtip-\" + fieldName,\r\n content: {\r\n text: \"\"\r\n },\r\n position: {\r\n adjust: {\r\n x: -10, y: -10\r\n }\r\n },\r\n style: {\r\n classes: \"toolTipStyle\"\r\n }\r\n });\r\n\r\n $col.qtip('disable', true);\r\n\r\n };\r\n\r\n $scope.processGridColumnValidationNotification = function ($row, fieldName, errorMessages, warningMessages)\r\n {\r\n\r\n var idx = 0;\r\n\r\n var hasErrors = (errorMessages.length > 0);\r\n var hasWarnings = (warningMessages.length > 0);\r\n\r\n var $col = $row.find(\"[data-field='\" + fieldName + \"']\");\r\n\r\n //clear classes\r\n $col.removeClass(\"td-error\");\r\n $col.removeClass(\"td-warning\");\r\n\r\n if (hasErrors || hasWarnings)\r\n {\r\n\r\n var messageList = $(\"
    \");\r\n\r\n if (hasErrors)\r\n {\r\n var errorList = $(\"
    \" + localStrings.getLocalizedString(\"Error\") + \" :
    \");\r\n for (idx = 0; idx < errorMessages.length; idx++)\r\n {\r\n errorList.append(\"
  • \" + errorMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(errorList);\r\n }\r\n\r\n if (hasWarnings)\r\n {\r\n var warningList = $(\"
    \" + localStrings.getLocalizedString(\"Warning\") + \" :
    \");\r\n for (idx = 0; idx < warningMessages.length; idx++)\r\n {\r\n warningList.append(\"
  • \" + warningMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(warningList);\r\n }\r\n\r\n $col.qtip('option', 'content.text', messageList);\r\n\r\n if (hasErrors)\r\n {\r\n $col.addClass(\"td-error\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-error');\r\n } else\r\n {\r\n $col.addClass(\"td-warning\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-warning');\r\n }\r\n\r\n $col.qtip('disable', false);\r\n }\r\n else\r\n {\r\n $col.qtip('disable', true);\r\n }\r\n };\r\n\r\n var tankRowValidation =\r\n {\r\n validator: function (tank, parms)\r\n {\r\n var isValid = true;\r\n\r\n var $row = $(\"#tanksGrid\").data(\"kendoGrid\").tbody.find(\"tr[data-uid='\" + tank.uid + \"']\");\r\n\r\n var errorFuelQty = [], warningFuelQty = [];\r\n\r\n // fuel quantity validation\r\n var maxTankVolume = PaperworkTanksService.getMaxVolumeFromTankChart(tank, $scope.appInfo.paperwork.tankCharts);\r\n if (tank.Quantity > maxTankVolume)\r\n {\r\n errorFuelQty.push(localStrings.getLocalizedString(\"TankReadingExceeds\"));\r\n isValid = false;\r\n }\r\n\r\n var result = $scope.validateTankOverShort(tank);\r\n if (result.HasWarning)\r\n {\r\n warningFuelQty.push(localStrings.getLocalizedString(\"FuelMeasurementsEntered\") + \" \" + result.Min + \" \" + localStrings.getLocalizedString(\"And\") + \" \" + result.Max);\r\n }\r\n\r\n $scope.processGridColumnValidationNotification($row, 'Quantity', errorFuelQty, warningFuelQty);\r\n\r\n return isValid;\r\n }\r\n };\r\n\r\n $scope.validateTanks = function ()\r\n {\r\n\r\n var isValid = true;\r\n\r\n var tanksGrid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n\r\n $scope.tankCommentIsRequired = false;\r\n $scope.tankCommentRequiredError = false;\r\n angular.forEach(tanksGrid.dataSource.data(), function (tank)\r\n {\r\n isValid = isValid && tankRowValidation.validator(tank);\r\n });\r\n\r\n return isValid;\r\n };\r\n\r\n $scope.loadTanks = function (refreshDataSource)\r\n {\r\n if (!$scope.locationInfo.sideMenuData.paperwork.tanks)\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.batch.SiteKey)\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n });\r\n\r\n PaperworkTanksService.loadTanks(\r\n $scope.appInfo.paperwork.batch.Key,\r\n $scope.appInfo.paperwork.batch.SiteKey,\r\n $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true)\r\n ).then(function (data)\r\n {\r\n // if(data.count == 0){\r\n // TODO: No tanks, do something...\r\n // }\r\n $scope.appInfo.paperwork.tanks = data.PaperworkTanks;\r\n $scope.appInfo.paperwork.postedTanks = data.PostedPaperworkTanks;\r\n $scope.appInfo.paperwork.partialUnits = data.PartialUnitsList;\r\n $scope.appInfo.paperwork.metric = data.Metric;\r\n $scope.appInfo.paperwork.quantityOnly = data.QuantityOnly;\r\n $scope.appInfo.paperwork.useLargeUnits = data.UseLargeUnits;\r\n $scope.appInfo.paperwork.useTempCorrections = data.UseTempCorrections;\r\n $scope.appInfo.paperwork.trackWaterLevels = data.TrackWaterLevels;\r\n $scope.appInfo.paperwork.tankCharts = data.TankCharts;\r\n $scope.appInfo.paperwork.tempCharts = data.TempCharts;\r\n $scope.appInfo.paperwork.OSComments = data.OSComments;\r\n $scope.appInfo.paperwork.UseOSWarnings = data.UseOSWarnings;\r\n $scope.appInfo.paperwork.OSWarningUnits = data.OSWarningUnits;\r\n $scope.appInfo.paperwork.OSWarningPct = data.OSWarningPct;\r\n $scope.appInfo.paperwork.RequireOSComments = data.RequireOSComments;\r\n\r\n if (!refreshDataSource)\r\n {\r\n $scope.initializeTanksGrid();\r\n } else\r\n {\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n if(angular.isUndefinedOrNullOrEmpty(grid)) return;\r\n grid.dataSource.data(data.PaperworkTanks);\r\n\r\n $scope.validateTanks(); // call00 validate to re add any warnings after save\r\n }\r\n\r\n $scope.tanksLoaded = true;\r\n\r\n if ($scope.appInfo.paperwork.postedTanks.length > 0) {\r\n $scope.postedReadingsExist = true;\r\n }\r\n\r\n if ($scope.appInfo.paperwork.tanks.length > 0) {\r\n $scope.tanksEditable = !($scope.appInfo.paperwork.context.lockPaperworkAfterDru && $scope.appInfo.paperwork.tanks[0].DRUPosted);\r\n }\r\n });\r\n };\r\n\r\n $scope.tankCommentIsRequired = false;\r\n $scope.tankCommentRequiredError = false;\r\n\r\n var tankCommentValidation =\r\n {\r\n name: 'validateTankComment',\r\n validationMessage: localStrings.getLocalizedString(\"FuelMeasurementsNotInToleranceComment\"),\r\n validatorError: function ()\r\n {\r\n $scope.tankCommentRequiredError = false;\r\n\r\n if (!$scope.appInfo.paperwork.UseOSWarnings || !$scope.appInfo.paperwork.RequireOSComments || !$scope.tankCommentIsRequired)\r\n {\r\n return true; // not required or not overshort warning\r\n }\r\n\r\n\r\n if ($scope.appInfo.paperwork.NewOSComments.length > 0 || ($scope.appInfo.paperwork.OSComments.Text && $scope.appInfo.paperwork.OSComments.Text.length > 0))\r\n {\r\n return true;\r\n }\r\n\r\n $scope.tankCommentRequiredError = true;\r\n return false;\r\n }\r\n };\r\n\r\n $scope.tankCommentErrorOnBlur = function ()\r\n {\r\n $(\"#tankCommmentValidationMessage\").attr('style', 'display: none !important;');\r\n };\r\n\r\n $scope.tankCommentErrorOnFocus = function ()\r\n {\r\n $(\"#tankCommmentValidationMessage\").attr('style', 'display: inline-block !important;');\r\n };\r\n\r\n var PageStage = $rootScope.$on('event:PageStage', function (event, args)\r\n {\r\n if (args === 'DREGS' && !$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.savePaperworkTanks('', false, false);\r\n } \r\n });\r\n $scope.$on('$destroy', PageStage);\r\n\r\n $scope.next = function (path)\r\n {\r\n if (!validatorSvc.executeValidations()) {\r\n return;\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.tanksEditable)\r\n {\r\n $scope.savePaperworkTanks(path, false, false);\r\n } else {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, false));\r\n }\r\n };\r\n\r\n $scope.previous = function (path)\r\n {\r\n if (!validatorSvc.executeValidations()) {\r\n return;\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.tanksEditable)\r\n {\r\n $scope.savePaperworkTanks(path, false, false, true);\r\n } else {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, true));\r\n }\r\n };\r\n\r\n $scope.close = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.tanksEditable)\r\n {\r\n $scope.savePaperworkTanks(\"\", false, false);\r\n } else {\r\n $scope.goTo(\"/Paperwork/EnterPaperwork/\");\r\n }\r\n };\r\n\r\n $scope.submit = function ()\r\n {\r\n $scope.savePaperworkTanks(\"\", true, false);\r\n };\r\n\r\n function initPopup() {\r\n var popupTitle = localStrings.getLocalizedString(\"PostedFuelTankReadings\");\r\n var postedHtml = '
    ';\r\n\r\n $scope.modalifier.show(popupTitle, postedHtml);\r\n\r\n setTimeout(function () {\r\n //get and modify the original grids options\r\n $scope.gridOptions = {};\r\n angular.copy($scope.tanksGridOptions, $scope.gridOptions);\r\n $scope.gridOptions.editable = false;\r\n\r\n // manually update imperial/metric units in header (large units, small units, temperature) - angular directives are not evaluated in popup\r\n $scope.gridOptions.columns[2].columns[0].headerTemplate = $scope.appInfo.paperwork.metric ? \"m.\" : \"ft.\";\r\n $scope.gridOptions.columns[2].columns[1].headerTemplate = $scope.appInfo.paperwork.metric ? \"cm.\" : \"in.\";\r\n $scope.gridOptions.columns[3].columns[0].headerTemplate = $scope.appInfo.paperwork.metric ? \"cm.\" : \"in.\";\r\n $scope.gridOptions.columns[4].columns[0].headerTemplate = $scope.appInfo.paperwork.metric ? \"°C\" : \"°F\";\r\n\r\n // grab the empty element and make it a kendo grid\r\n var el = $('div.popupTanksTable');\r\n el.kendoGrid($scope.gridOptions);\r\n\r\n // checkbox imputs must be manually disabled\r\n el.find('.grid-checkbox').attr('readonly', true);\r\n //$('input.noReadChkBox').Attr('disabled', true);\r\n\r\n // hide columns based on record type\r\n var grid = el.data('kendoGrid');\r\n $scope.setupTankGridColumns(grid);\r\n\r\n // set datasource\r\n grid.dataSource.data($scope.appInfo.paperwork.postedTanks);\r\n grid.refresh();\r\n }, 0);\r\n }\r\n\r\n $scope.showPostedReadings = function () {\r\n if ($('div.popupTanksTable').length > 0)\r\n $scope.modalifier.display = true;\r\n else\r\n initPopup();\r\n };\r\n\r\n $scope.processSubmit = function (submit) {\r\n\r\n var submitPaperworkCmdParms =\r\n {\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n EmailAddress: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SubmitPaperwork: submit,\r\n PreviouslySubmitted: $scope.appInfo.paperwork.batch.HasBeenSubmitted\r\n };\r\n\r\n PaperworkService.GetPaperworkBatchErrorWarning(submitPaperworkCmdParms).then(function (data) {\r\n //If warnings - show confirm dialog\r\n if (data.HasWarnings) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Warnings[0])) {\r\n $scope.notifier.show(data.Warnings[0], \"warning\");\r\n\r\n var yes = function () {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n };\r\n\r\n $scope.modalifier.confirm(data.Warnings[0] + \"
    \" + localStrings.getLocalizedString(\"WishToContinue\"), yes);\r\n }\r\n }\r\n else {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n }\r\n });\r\n };\r\n\r\n $scope.submitPaperwork = function (submit)\r\n {\r\n var fuelMetersAppInfo = $scope.appInfo.paperwork.apps[0];\r\n\r\n //If we have fuelMeters and fuelMeters are required, but not saved; then throw error\r\n if (fuelMetersAppInfo.HasData === 0 && fuelMetersAppInfo.IsRequired !== 0) {\r\n $timeout(function () {\r\n $scope.modalifier.showSavedError();\r\n }, 100);\r\n return;\r\n }\r\n\r\n $scope.processSubmit(submit);\r\n };\r\n\r\n $scope.savePaperworkTanks = function (path, submit, close, isPrevious)\r\n {\r\n isPrevious = isPrevious ? isPrevious : false;\r\n \r\n //Allow saving first time when just visiting page without cliking anything on page\r\n if ($('#tanksGrid .k-dirty-cell').length > 0 || $scope.appInfo.paperwork.tanks[0].HeaderKey === 0) {\r\n\r\n if (!$scope.validateTanks()) {\r\n return;\r\n } else {\r\n if ($scope.tankCommentIsRequired) {\r\n var commentIsValid = tankCommentValidation.validatorError();\r\n if (!commentIsValid) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n $scope.resetDirtyFlags($scope.tanksForm);\r\n\r\n angular.copy($scope.tanksGridDS.data().toJSON(), $scope.appInfo.paperwork.tanks);\r\n\r\n var tankHeader = {\r\n Key: $scope.appInfo.paperwork.tanks[0].HeaderKey,\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n Status: $scope.appInfo.paperwork.tanks[0].Status,\r\n StickType: $scope.appInfo.paperwork.tanks[0].StickType,\r\n Ts: $scope.appInfo.paperwork.tanks[0].HeaderTimeStamp,\r\n PaperworkBatchKey: $scope.appInfo.paperwork.batch.Key,\r\n AppKey: $scope.locationInfo.sideMenuData.paperwork.tanks.Key,\r\n UserName: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n OSComments: {\r\n Key: $scope.appInfo.paperwork.OSComments.Key,\r\n FuelStkHdrKey: $scope.appInfo.paperwork.OSComments.FuelStkHdrKey,\r\n Text: $scope.appInfo.paperwork.OSComments.Text,\r\n NewText: $scope.appInfo.paperwork.NewOSComments,\r\n Ts: $scope.appInfo.paperwork.OSComments.Ts,\r\n Timestamp: $scope.appInfo.paperwork.OSComments.Timestamp\r\n }\r\n };\r\n\r\n PaperworkTanksService.savePaperworkTanks(tankHeader, $scope.appInfo.paperwork.tanks).then(function (data) {\r\n //get updated data\r\n $scope.loadTanks(true);\r\n\r\n $scope.appInfo.paperwork.NewOSComments = \"\";\r\n //Submit after saving for Fuel Tank Reading \r\n if (submit) {\r\n $scope.submitPaperwork(true);\r\n return;\r\n }\r\n });\r\n }\r\n else {\r\n if (submit) {\r\n $scope.submitPaperwork(true);\r\n return;\r\n }\r\n }\r\n\r\n if (close) {\r\n $scope.submitPaperwork(false);\r\n return;\r\n }\r\n if (path.length > 0){\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, false, isPrevious));\r\n }\r\n };\r\n\r\n $scope.getPartialValue = function (value)\r\n {\r\n for (var x in $scope.appInfo.paperwork.partialUnits)\r\n {\r\n if ($scope.appInfo.paperwork.partialUnits[x] === value)\r\n return $scope.appInfo.paperwork.partialUnits[x];\r\n }\r\n };\r\n\r\n })\r\n .controller('enterPaperworkDeliveriesCtrl', function ($scope, $rootScope, $routeParams, PaperworkService, $filter, PaperworkDeliveriesService,\r\n $location, WebFunctions, validatorSvc, $timeout, $q, $compile, templates, localStrings, globalizationSvc,setupNav)\r\n {\r\n 'use strict';\r\n $scope.kendo = {};\r\n $scope.appInfo.paperwork.paperworkKey = 0;\r\n $scope.appInfo.paperwork.deliveries = {};\r\n $scope.appInfo.paperwork.deliveriesList = {};\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = {};\r\n $scope.appInfo.paperwork.deliveries.context = {};\r\n $scope.appInfo.paperwork.deliveries.context.AuthorizedVendors = [];\r\n $scope.appInfo.paperwork.deliveries.context.AuthorizedTerminals = [];\r\n $scope.appInfo.paperwork.deliveries.context.AuthorizedCarriers = [];\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryFreight = [];\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.VendKey = -1;\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.TrmnlKey = -1;\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.CarrierKey = -1;\r\n $scope.deliveriesLoaded = false;\r\n $scope.deliveryFilteredTanks = [];\r\n\r\n $scope.currentView = 0; // 0 = record selector; 1= entry\r\n\r\n $scope.changeView = function (view)\r\n {\r\n\r\n // 0 = record selector; 1= entry\r\n\r\n if (view === 1)\r\n { // chnange to entry\r\n $scope.currentView = 1;\r\n } else\r\n {\r\n $scope.currentView = 0;\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = {}; // clear delivery\r\n }\r\n };\r\n\r\n $scope.freightModalFormDelegate = {};\r\n\r\n //grid validations\r\n $scope.productValidation = {hasErrors: false, errorDescription: \"\"};\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler()\r\n {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n $scope.appInfo = $scope.appInfo || {};\r\n\r\n $scope.appInfo.paperwork.viewOnly = $location.$$path.indexOf('/ViewPaperworkDeliveries/') > -1;\r\n if ($routeParams.paperworkKey)\r\n {\r\n $scope.appInfo.paperwork.paperworkKey = $routeParams.paperworkKey;\r\n }\r\n $scope.appInfo.paperwork.NewOSComments = '';\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n // $scope.getWebProfileMessage(19);\r\n $scope.globalizationSvc = globalizationSvc;\r\n\r\n $scope.newDeliveryProduct = {};\r\n\r\n $scope.appInfo.paperwork.batch = {};\r\n\r\n if (!$scope.appInfo.paperwork.context)\r\n {\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true).then(\r\n function (data)\r\n {\r\n $scope.appInfo.paperwork.context = {};\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n }\r\n );\r\n }\r\n\r\n if ($scope.appInfo.paperwork.paperworkKey > 0)\r\n {\r\n //We are loading a known existing paperwork batch\r\n PaperworkService.OpenPaperworkBatchByKey(\r\n $scope.appInfo.paperwork.paperworkKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n $scope.appInfo.paperwork.viewOnly\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n \r\n // resolve if this is the first or last page\r\n var res = setupNav.firstLastPage('DREFD',$scope.appInfo.paperwork.apps);\r\n $scope.locationInfo.sideMenuData.isFirstPage = res.isFirstPage;\r\n $scope.locationInfo.sideMenuData.isLastPage = res.isLastPage;\r\n\r\n $rootScope.$broadcast('event:PaperworkLoaded', $scope.appInfo.paperwork.viewOnly, $scope.appInfo.paperwork.paperworkKey);\r\n\r\n var nextApp = true;\r\n angular.forEach($scope.appInfo.paperwork.apps, function (app, index)\r\n {\r\n if (app.MenuCode === 'DREFD')\r\n {\r\n $scope.getDeliveriesWithContext();\r\n nextApp = false;\r\n }\r\n });\r\n if (nextApp)\r\n {\r\n $scope.goTo(setupNav.navigateToPage('DREFD',$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n }\r\n }, function ()\r\n {\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n });\r\n } else\r\n {\r\n //todo: goback...\r\n }\r\n $scope.locationInfo.sideMenuData.pwSubMenu = '4';\r\n\r\n $scope.hideModals();\r\n };\r\n\r\n var newPWBatchLoadedListener = $rootScope.$on('event:NewPaperworkBatchLoaded', function (event, data)\r\n {\r\n if ($scope.locationInfo.sideMenuData.paperwork.tanks)\r\n $scope.getDeliveriesWithContext();\r\n else\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n });\r\n\r\n // $scope $destroy\r\n $scope.$on('$destroy', newPWBatchLoadedListener);\r\n\r\n $scope.getDeliveriesWithContext = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData.paperwork.deliveries)\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.batch.SiteKey)\r\n {\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n }\r\n });\r\n\r\n PaperworkDeliveriesService.getDeliveriesWithContext(\r\n $scope.appInfo.paperwork.batch.Key, $scope.appInfo.paperwork.viewOnly\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.deliveries = {};\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = {};\r\n $scope.appInfo.paperwork.deliveries.context = data.Context;\r\n $scope.appInfo.paperwork.deliveries.deliveriesList = data.FuelDeliveriesList;\r\n\r\n // if there are no deliveries for this paperwork batch then drop in to add mode for new delivery\r\n if (data.FuelDeliveriesList.length === 0)\r\n {\r\n // currently petronet can only edit petronet source fuel delivery so expect on one row returned\r\n data.NewDelivery.LiftDatetime = globalizationSvc.formatDateTime(data.NewDelivery.LiftDatetime, 'g');\r\n data.NewDelivery.DelivDateTime = globalizationSvc.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate, 'g');\r\n\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = data.NewDelivery;\r\n\r\n $scope.fuelDeliveriesCount = data.FuelDeliveriesList.length;\r\n\r\n $scope.initializeDeliveriesGrid();\r\n\r\n $scope.changeView(1);\r\n }\r\n\r\n $scope.deliveriesLoaded = true;\r\n });\r\n };\r\n\r\n var gridColEditorInput = function (container, options)\r\n {\r\n\r\n var fieldName = \"'\" + options.field + \"'\";\r\n\r\n var required = $(container).attr('required'); // field is required\r\n\r\n // For some browsers, `attr` is undefined; for others,\r\n // `attr` is false. Check for both.\r\n if (typeof required !== typeof undefined && required !== false)\r\n {\r\n $('')\r\n .appendTo(container)\r\n .kendoNumericTextBox({\r\n format: \"#\",\r\n max: 100000000,\r\n min: -100000000,\r\n });\r\n } else\r\n {\r\n $('')\r\n .appendTo(container)\r\n .kendoNumericTextBox({\r\n format: \"#\",\r\n max: 100000000,\r\n min: -100000000,\r\n });\r\n }\r\n\r\n };\r\n\r\n var gridColNumber = function (field, format)\r\n {\r\n return '';\r\n };\r\n\r\n var productEditor = function (container, options)\r\n {\r\n $(\"\")\r\n\r\n .appendTo(container)\r\n .kendoComboBox({\r\n id: \"productList\",\r\n dataSource: {\r\n data: $scope.appInfo.paperwork.deliveries.context.SiteTankProducts\r\n },\r\n filter: \"contains\",\r\n dataTextField: localStrings.getLocalizedString(\"ID\"),\r\n dataValueField: \"Key\",\r\n template: \"
    ${ Id }${ Description }
    \",\r\n change: function (e)\r\n {\r\n\r\n var selectionElement = $(e.sender.element[0]).parent().find(\".k-dropdown-wrap\");\r\n\r\n // check if valid\r\n if ($(e.sender.element[0]).hasClass(\"k-invalid\"))\r\n {\r\n selectionElement.addClass(\"k-selection-invalid\");\r\n } else\r\n {\r\n selectionElement.removeClass(\"k-selection-invalid\");\r\n }\r\n\r\n if (this.value() && this.selectedIndex === -1)\r\n {\r\n this.value('');\r\n this._filterSource({\r\n value: \"\",\r\n field: this.options.dataTextField,\r\n operator: \"contains\"\r\n });\r\n return;\r\n }\r\n\r\n var dataItem = e.sender.dataItem();\r\n options.model.set(\"ProdId\", dataItem.Id);\r\n options.model.set(\"ProdDesc\", dataItem.Description);\r\n },\r\n open: function(e) {\r\n var width = $(\".k-combobox\").width() + 300;\r\n $(\".k-animation-container\").width(width);\r\n $(\".k-list-container\").width(width - 4);\r\n }\r\n });\r\n\r\n $('').appendTo(container);\r\n\r\n };\r\n\r\n var tankEditor = function (container, options)\r\n {\r\n $(\"\")\r\n\r\n .appendTo(container)\r\n .kendoComboBox({\r\n id: \"tankList\",\r\n filter: \"contains\",\r\n dataSource: {\r\n data: $scope.getFilteredTanksList(options.model.ProdKey)\r\n },\r\n dataTextField: \"TankNo\",\r\n dataValueField: \"TankNo\",\r\n change: function (e)\r\n {\r\n\r\n var selectionElement = $(e.sender.element[0]).parent().find(\".k-dropdown-wrap\");\r\n\r\n // check if valid\r\n if ($(e.sender.element[0]).hasClass(\"k-invalid\"))\r\n {\r\n selectionElement.addClass(\"k-selection-invalid\");\r\n } else\r\n {\r\n selectionElement.removeClass(\"k-selection-invalid\");\r\n }\r\n\r\n if (this.value() && this.selectedIndex === -1)\r\n {\r\n this.value('');\r\n this._filterSource({\r\n value: \"\",\r\n field: this.options.dataTextField,\r\n operator: \"contains\"\r\n });\r\n return;\r\n }\r\n\r\n var dataItem = e.sender.dataItem();\r\n options.model.set(\"SelectedTank\", dataItem);\r\n }\r\n });\r\n\r\n $('').appendTo(container);\r\n };\r\n\r\n $scope.getProductByKey = function (prodKey)\r\n {\r\n return $scope.appInfo.paperwork.deliveries.context.SiteTankProducts.find({Key: prodKey});\r\n };\r\n\r\n $scope.initializeDeliveriesGrid = function ()\r\n {\r\n\r\n $scope.deliveriesGridDS = new kendo.data.DataSource({\r\n schema: {\r\n model: {\r\n fields: {\r\n ProdKey: {type: \"number\"},\r\n ProdId: {type: \"string\"},\r\n ProdDesc: {type: \"string\"},\r\n TankNo: {type: \"number\"},\r\n DelivGrossQty: {type: \"number\"},\r\n DelivNetQty: {type: \"number\"},\r\n SelectedTank: {}\r\n }\r\n }\r\n },\r\n data: $scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryProducts,\r\n batch: true\r\n });\r\n\r\n $scope.deliveriesGridOptions = {\r\n dataSource: $scope.deliveriesGridDS,\r\n columns: [\r\n {\r\n title: localStrings.getLocalizedString(\"Product\"),\r\n columns: [\r\n {\r\n field: \"ProdKey\",\r\n title: localStrings.getLocalizedString(\"ID\"),\r\n width: 100,\r\n attributes: {\"data-field\": \"ProdKey\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n template: \"#=ProdId#\",\r\n editor: productEditor\r\n },\r\n {\r\n field: \"ProdDesc\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {\"data-field\": \"ProdDesc\", \"class\": \"tableCellDisabled description\"},\r\n template: \"#=ProdDesc#\",\r\n editor: function (element, options)\r\n {\r\n element.text(options.model.ProdDesc);\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n field: \"FuelDeliveryTanks[0].TankNo\",\r\n width: 100,\r\n template: \"#= FuelDeliveryTanks[0].TankNo #\",\r\n editor: tankEditor,\r\n headerTemplate: localStrings.getLocalizedString(\"Tank\"),\r\n attributes: {\"data-field\": \"TankNo\", \"class\": \"k-editable-cell\", \"required\": \"true\"}\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Units\"),\r\n columns: [\r\n {\r\n field: \"DelivGrossQty\",\r\n title: localStrings.getLocalizedString(\"Gross\"),\r\n width: 80,\r\n attributes: {\r\n \"data-field\": \"DelivGrossQty\",\r\n \"class\": \"k-editable-cell\",\r\n \"required\": \"true\"\r\n },\r\n template: gridColNumber(\"DelivGrossQty\", \"n2\"),\r\n editor: gridColEditorInput\r\n },\r\n {\r\n field: \"DelivNetQty\",\r\n title: localStrings.getLocalizedString(\"Net\"),\r\n width: 80,\r\n attributes: {\r\n \"data-field\": \"DelivNetQty\",\r\n \"class\": \"k-editable-cell\",\r\n \"required\": \"true\"\r\n },\r\n template: gridColNumber(\"DelivNetQty\", \"n2\"),\r\n editor: gridColEditorInput\r\n }\r\n ]\r\n },\r\n {\r\n field: \"DeleteDeliveryBtn\",\r\n template: \"\",\r\n width: 60,\r\n attributes: {\"data-field\": \"DeleteDeliveryBtn\"},\r\n headerTemplate: \" \"\r\n }\r\n ],\r\n pageable: false,\r\n sortable: false,\r\n editable: $scope.deliveryIsEditable(),\r\n scrollable: false,\r\n navigatable: true,\r\n dataBound: function (e)\r\n {\r\n $scope.setupDeliveryRows();\r\n },\r\n edit: function (e)\r\n {\r\n var $input = e.container.find(\"input\");\r\n var fieldName = $input.attr(\"name\");\r\n\r\n // alternative (if you don't have the name attribute in your editable):\r\n // var columnIndex = this.cellIndex(e.container);\r\n // var fieldName = this.thead.find(\"th\").eq(columnIndex).data(\"field\");\r\n\r\n if (!deliveriesGridColIsEditable(fieldName, e.model))\r\n {\r\n $input.prop('readonly', true);\r\n //this.closeCell(); // prevent editing\r\n } else\r\n {\r\n $input.select();\r\n $input.addClass('k-cell-state-selected');\r\n }\r\n\r\n var grid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n var currentCell = $(grid.tbody.children().find(\".k-edit-cell\"));\r\n\r\n grid.current(currentCell);\r\n }\r\n\r\n };\r\n\r\n };\r\n\r\n $scope.$on(\"kendoWidgetCreated\", function (event, widget)\r\n {\r\n\r\n var grid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n\r\n // the event is emitted for every widget; if we have multiple\r\n // widgets in this controller, we need to check that the event\r\n // is for the one we're interested in.\r\n\r\n if (widget === $scope.kendo.deliveriesGrid)\r\n {\r\n grid.dataSource.data($scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryProducts);\r\n\r\n $(\"#deliveriesGrid\").find(\"table\").on(\"keydown\", onGridKeydown);\r\n\r\n if ($scope.deliveryIsEditable())\r\n {\r\n var addDeliveryAction = $('
    ').appendTo($('#deliveriesGrid'));\r\n $compile(addDeliveryAction)($scope);\r\n }\r\n\r\n $scope.setupDeliveriesGridColumns();\r\n\r\n }\r\n });\r\n\r\n function onGridKeydown(e)\r\n {\r\n if (e.keyCode === kendo.keys.TAB)\r\n {\r\n var grid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n\r\n var current = grid.current();\r\n\r\n if (!current.hasClass(\"k-editable-cell\"))\r\n {\r\n var nextCell = current.nextAll(\".k-editable-cell\");\r\n if (!nextCell[0])\r\n {\r\n //search the next row\r\n var nextRow = current.parent().next();\r\n\r\n // if tabbing and reached the last cell then create new row\r\n if (nextRow.length === 0)\r\n {\r\n $scope.addDeliveryGridRow();\r\n\r\n var $newRow = $(grid.tbody.children().last());\r\n\r\n $newRow.find(\"td:eq(0) input\").focus();\r\n nextCell = $newRow;\r\n grid.current(nextCell);\r\n\r\n } else\r\n {\r\n nextCell = current.parent().next().children(\".k-editable-cell:first\");\r\n\r\n grid.current(nextCell);\r\n grid.editCell(nextCell[0]);\r\n }\r\n } else\r\n {\r\n grid.current(nextCell);\r\n grid.editCell(nextCell[0]);\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n $scope.setupDeliveryRows = function ()\r\n {\r\n\r\n $(\"#deliveriesGrid tr\").each(function (index, row)\r\n {\r\n\r\n if (index > 1)\r\n { // skip header rows\r\n\r\n $scope.setupDeliveryRow(row);\r\n }\r\n });\r\n };\r\n\r\n $scope.setupDeliveryRow = function (deliveryRow)\r\n {\r\n\r\n var dataItem = $(\"#deliveriesGrid\").data(\"kendoGrid\").dataItem(deliveryRow);\r\n\r\n var $row = $(deliveryRow);\r\n\r\n //set prod id and description for product key\r\n var selectedProduct = $scope.getProductByKey(dataItem.ProdKey);\r\n\r\n if (selectedProduct)\r\n {\r\n dataItem.set(\"ProdId\", selectedProduct.Id);\r\n dataItem.set(\"ProdDesc\", selectedProduct.Description);\r\n }\r\n\r\n var $rowColumns = $row.find('td');\r\n\r\n $rowColumns.each(function (index, col)\r\n {\r\n var $col = $(col);\r\n var fieldName = $col.attr('data-field');\r\n if (!deliveriesGridColIsEditable(fieldName, dataItem))\r\n {\r\n $col.addClass(\"tableCellDisabled\");\r\n $col.removeClass(\"k-editable-cell\");\r\n\r\n /*if (fieldName === \"DeleteDeliveryBtn\") {\r\n $col.find('i').hide();\r\n }*/\r\n }\r\n\r\n $scope.setupGridColumnValidationNotificationUI($col);\r\n });\r\n };\r\n\r\n $scope.addDeliveryGridRow = function ()\r\n {\r\n var grid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n\r\n if (grid)\r\n {\r\n\r\n // check if there is a new row already and if it is not valid then don't create a another new row\r\n // if there is a invalid new row remove it before validating\r\n var $lastRow = $(grid.tbody.children().last());\r\n var isNewRow = $lastRow.hasClass('newRow');\r\n\r\n if (isNewRow)\r\n {\r\n var hasDirtyRow = $lastRow.find('.k-dirty');\r\n\r\n if (hasDirtyRow.length === 0)\r\n {\r\n grid.cancelRow();\r\n }\r\n }\r\n\r\n $(\"deliveriesGrid\").removeClass(\"newRow\");\r\n\r\n //this logic creates a new item in the datasource/datagrid\r\n var dataSource = grid.dataSource;\r\n var totalRows = dataSource.data().length;\r\n\r\n var newDeliveryProduct = {\r\n \"AllocFuelContKey\": null,\r\n \"AllocFuelContDtlKey\": null,\r\n \"AllocLastPostedFuelContDtlKey\": null,\r\n \"BasedOnUnits\": 0,\r\n \"BOLAutoMatched\": 0,\r\n \"BOLDtlKey\": null,\r\n \"BusEntKey\": null,\r\n \"CalcExtCost\": 0,\r\n \"CalcFrtCost\": 0,\r\n \"CalcUnitCost\": 0,\r\n \"CnfrmDateTime\": null,\r\n \"CnfrmStatus\": 0,\r\n \"CnfrmUserID\": null,\r\n \"ContractOverride\": 0,\r\n \"CostOverride\": 0,\r\n \"CostPosted\": 0,\r\n \"CustLocKey\": null,\r\n \"DelivDateTime\": $scope.appInfo.paperwork.deliveries.fuelDelivery.DelivDateTime,\r\n \"DelivGrossQty\": 0,\r\n \"DelivNetQty\": 0,\r\n \"DestProdKey\": null,\r\n \"DestSiteKey\": $scope.appInfo.paperwork.batch.SiteKey,\r\n \"DestType\": 0,\r\n \"ExternalRecID\": null,\r\n \"FrtInInventory\": -1,\r\n \"FrtOverride\": 0,\r\n \"FrtPLAmt\": 0,\r\n \"FrtPLInInvAmt\": 0,\r\n \"FrtPLInInventory\": -1,\r\n \"FueldelProdFrtReconGrossQty\": 0,\r\n \"FueldelProdFrtReconNetQty\": 0,\r\n \"FrtReconUserID\": null,\r\n \"FrtReconciled\": 0,\r\n \"FrtUnitCost\": 0,\r\n \"FrtVndInvKey\": null,\r\n \"FrtVndInvPndKey\": null,\r\n \"FuelContKey\": null,\r\n \"FuelContDtlKey\": null,\r\n \"FuelDelKey\": $scope.appInfo.paperwork.deliveries.fuelDelivery.Key,\r\n \"InvcExtCost\": 0,\r\n \"InvcFrtCost\": 0,\r\n \"InvcFrtUnitCost\": 0,\r\n \"InvcGrossQty\": 0,\r\n \"InvcNetQty\": 0,\r\n \"InvcUnitCost\": 0,\r\n \"Key\": 0,\r\n \"LastPostedFuelContDtlKey\": null,\r\n \"OrdQty\": 0,\r\n \"OrigProdKey\": null,\r\n \"OwnerOption\": 0,\r\n \"ProdKey\": \"\",\r\n \"ReconUserID\": null,\r\n \"Reconciled\": 0,\r\n \"SiteKey\": $scope.appInfo.paperwork.batch.SiteKey,\r\n \"SourceKey\": 0,\r\n \"SourceType\": 1,\r\n \"TaxPLAmt\": 0,\r\n \"TaxPLInInvAmt\": 0,\r\n \"VndInvKey\": null,\r\n \"VndInvPndKey\": null,\r\n \"Timestamp\": \"\",\r\n \"FuelDeliveryTanks\": [\r\n {\r\n \"DelivQty\": 0,\r\n \"DelProdKey\": 0,\r\n \"Ethanol\": 0,\r\n \"InventoryCost\": 0,\r\n \"Key\": 0,\r\n \"LastCost\": 0,\r\n \"LastDelivGrossQty\": 0,\r\n \"LastDelivNetQty\": 0,\r\n \"LastEthanol\": 0,\r\n \"LastOctane\": 0,\r\n \"LastQty\": 0,\r\n \"LastRVP\": 0,\r\n \"LastTankNo\": null,\r\n \"Octane\": 0,\r\n \"OrdQty\": 0,\r\n \"RplCarrierKey\": null,\r\n \"RplCostAssigned\": 0,\r\n \"RplTrmnlKey\": null,\r\n \"RplVendKey\": null,\r\n \"RVP\": 0,\r\n \"TankNo\": \"\",\r\n \"Timestamp\": \"\"\r\n }\r\n ],\r\n ProdId: \"\",\r\n ProdDesc: \"\"\r\n };\r\n\r\n dataSource.insert(totalRows, newDeliveryProduct);\r\n\r\n grid.editRow(grid.tbody.children().last());\r\n\r\n var $newRow = $(grid.tbody.children().last());\r\n $newRow.addClass(\"newRow\");\r\n $scope.setupDeliveryRow($newRow);\r\n\r\n }\r\n };\r\n\r\n $scope.setupDeliveriesGridColumns = function ()\r\n {\r\n\r\n if (!$scope.appInfo.paperwork.deliveries.context.ShowGrossUnits)\r\n {\r\n $scope.kendo.deliveriesGrid.hideColumn(\"DelivGrossQty\");\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.deliveries.context.ShowNetUnits)\r\n {\r\n $scope.kendo.deliveriesGrid.hideColumn(\"DelivNetQty\");\r\n }\r\n\r\n if (!$scope.deliveryIsEditable())\r\n {\r\n $scope.kendo.deliveriesGrid.hideColumn(\"DeleteDeliveryBtn\");\r\n }\r\n\r\n };\r\n\r\n\r\n $scope.deleteDeliveryProductRow = function (dataItem)\r\n {\r\n\r\n var dataRow = $('#deliveriesGrid').data(\"kendoGrid\").dataSource.getByUid(dataItem.uid);\r\n $('#deliveriesGrid').data(\"kendoGrid\").dataSource.remove(dataRow);\r\n\r\n };\r\n\r\n function deliveriesGridColIsEditable(fieldName, model)\r\n {\r\n\r\n if (fieldName === \"ProdKey\")\r\n {\r\n return $scope.deliveryIsEditable();\r\n }\r\n\r\n if (fieldName === \"ProdDesc\")\r\n {\r\n return false;\r\n }\r\n\r\n if (fieldName === \"TankNo\")\r\n {\r\n return $scope.deliveryIsEditable();\r\n }\r\n\r\n if (fieldName === \"DelivGrossQty\")\r\n {\r\n return true;\r\n }\r\n\r\n if (fieldName === \"DelivNetQty\")\r\n {\r\n return true;\r\n }\r\n\r\n return true; // default to editable\r\n }\r\n\r\n $scope.setupGridColumnValidationNotificationUI = function ($col)\r\n {\r\n\r\n var fieldName = $col.attr('data-field');\r\n\r\n $col.qtip({\r\n id: \"qtip-\" + fieldName,\r\n content: {\r\n text: \"\"\r\n },\r\n position: {\r\n adjust: {\r\n x: -10, y: -10\r\n }\r\n },\r\n style: {\r\n classes: \"toolTipStyle\"\r\n }\r\n });\r\n\r\n $col.qtip('disable', true);\r\n\r\n };\r\n\r\n $scope.processGridColumnValidationNotification = function ($row, fieldName, errorMessages, warningMessages)\r\n {\r\n\r\n var idx = 0;\r\n\r\n var hasErrors = (errorMessages.length > 0);\r\n var hasWarnings = (warningMessages.length > 0);\r\n\r\n var $col = $row.find(\"[data-field='\" + fieldName + \"']\");\r\n\r\n //clear classes\r\n $col.removeClass(\"td-error\");\r\n $col.removeClass(\"td-warning\");\r\n\r\n if (hasErrors || hasWarnings)\r\n {\r\n\r\n var messageList = $(\"
    \");\r\n\r\n if (hasErrors)\r\n {\r\n var errorList = $(\"
    \" + localStrings.getLocalizedString(\"Error\") + \" :
    \");\r\n for (idx = 0; idx < errorMessages.length; idx++)\r\n {\r\n errorList.append(\"
  • \" + errorMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(errorList);\r\n }\r\n\r\n if (hasWarnings)\r\n {\r\n var warningList = $(\"
    \" + localStrings.getLocalizedString(\"Warning\") + \" :
    \");\r\n for (idx = 0; idx < warningMessages.length; idx++)\r\n {\r\n warningList.append(\"
  • \" + warningMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(warningList);\r\n }\r\n\r\n $col.qtip('option', 'content.text', messageList);\r\n\r\n if (hasErrors)\r\n {\r\n $col.addClass(\"td-error\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-error');\r\n } else\r\n {\r\n $col.addClass(\"td-warning\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-warning');\r\n }\r\n\r\n $col.qtip('disable', false);\r\n }\r\n else\r\n {\r\n $col.qtip('disable', true);\r\n }\r\n };\r\n\r\n if (!$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.$watch('appInfo.paperwork.deliveries.fuelDelivery.VendKey', function (newValue, oldValue)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(newValue) || (newValue < 0) || (newValue === oldValue) || $scope.currentView === 0)\r\n {\r\n return;\r\n }\r\n\r\n var vendKey = newValue;\r\n\r\n if ($scope.appInfo.paperwork.deliveries.context.UsesSiteAuthorizedTerminals)\r\n { // uses selected or exculusive site authorized terminals\r\n\r\n if (newValue === \"\")\r\n {\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.TrmnlKey = \"\";\r\n $scope.appInfo.paperwork.deliveries.context.AuthorizedTerminals = [];\r\n return;\r\n }\r\n\r\n PaperworkDeliveriesService.getSiteFuelAuthorizedOrigins(\r\n $scope.appInfo.paperwork.batch.Key, vendKey\r\n ).then(function (data)\r\n {\r\n angular.copy(data, $scope.appInfo.paperwork.deliveries.context.AuthorizedTerminals);\r\n\r\n //save of bound terminal key before updating datasource\r\n var trmnlKey = $scope.appInfo.paperwork.deliveries.fuelDelivery.TrmnlKey;\r\n\r\n $scope.kendo.terminals.dataSource.data($scope.appInfo.paperwork.deliveries.context.AuthorizedTerminals);\r\n\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.TrmnlKey = trmnlKey;\r\n\r\n });\r\n }\r\n\r\n });\r\n }\r\n\r\n var PageStage = $rootScope.$on('event:PageStage', function (event, args)\r\n {\r\n if (args === 'DREFD' && !$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.savePaperworkDelivery('', false, false);\r\n } \r\n });\r\n $scope.$on('$destroy', PageStage);\r\n\r\n $scope.next = function (path)\r\n {\r\n if (!$scope.validateDeliveries())\r\n return;\r\n\r\n if ($(\"#appForm\").hasClass(\"ng-dirty\"))\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, false));\r\n }\r\n else\r\n {\r\n $scope.savePaperworkDelivery(path, false, false);\r\n }\r\n } else\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n }\r\n };\r\n\r\n $scope.previous = function (path)\r\n {\r\n if ($(\"#appForm\").hasClass(\"ng-dirty\"))\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, true));\r\n }\r\n else\r\n {\r\n $scope.savePaperworkDelivery(path, false, false, true);\r\n }\r\n } else\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, true));\r\n }\r\n };\r\n\r\n $scope.close = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.savePaperworkDelivery(\"\", false, false);\r\n } else\r\n {\r\n $scope.goTo(\"/Paperwork/EnterPaperwork/\");\r\n }\r\n };\r\n\r\n $scope.submit = function ()\r\n {\r\n if (!$scope.validateDeliveries())\r\n return;\r\n\r\n if ($scope.currentView === 0 || $(\"#appForm\").hasClass(\"ng-pristine\"))\r\n { // if in record selector just submit\r\n $scope.submitPaperwork(true);\r\n } else\r\n { // if in form save and then submit\r\n\r\n $scope.savePaperworkDelivery(\"\", true, false);\r\n }\r\n };\r\n\r\n $scope.processSubmit = function (submit) {\r\n\r\n var submitPaperworkCmdParms =\r\n {\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n EmailAddress: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SubmitPaperwork: submit,\r\n PreviouslySubmitted: $scope.appInfo.paperwork.batch.HasBeenSubmitted\r\n };\r\n\r\n PaperworkService.GetPaperworkBatchErrorWarning(submitPaperworkCmdParms).then(function (data) {\r\n //If warnings - show confirm dialog\r\n if (data.HasWarnings) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Warnings[0])) {\r\n $scope.notifier.show(data.Warnings[0], \"warning\");\r\n\r\n var yes = function () {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n };\r\n\r\n $scope.modalifier.confirm(data.Warnings[0] + \"
    \" + localStrings.getLocalizedString(\"WishToContinue\"), yes);\r\n }\r\n }\r\n else {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n }\r\n });\r\n };\r\n\r\n $scope.submitPaperwork = function (submit)\r\n {\r\n var fuelMetersAppInfo = $scope.appInfo.paperwork.apps[0];\r\n\r\n //If we have fuelMeters and fuelMeters are required, but not saved; then throw error\r\n if (fuelMetersAppInfo.HasData === 0 && fuelMetersAppInfo.IsRequired !== 0) {\r\n $timeout(function () {\r\n $scope.modalifier.showSavedError();\r\n }, 100);\r\n return;\r\n }\r\n\r\n $scope.processSubmit(submit);\r\n };\r\n\r\n $scope.savePaperworkDelivery = function (path, submit, close, isPrevious)\r\n {\r\n var deliveriesGrid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n\r\n // if there is a invalid new row remove it before validating\r\n var $lastRow = $(deliveriesGrid.tbody.children().last());\r\n var isNewRow = $lastRow.hasClass('newRow');\r\n isPrevious = isPrevious ? isPrevious : false;\r\n if (isNewRow)\r\n {\r\n var rowIsDirty = $lastRow.find('.k-dirty'); // find any columns that are dirty\r\n\r\n if (rowIsDirty.length === 0)\r\n {\r\n deliveriesGrid.cancelRow();\r\n }\r\n }\r\n\r\n if (!validatorSvc.executeValidations() || !$scope.validateDeliveries())\r\n {\r\n return;\r\n }\r\n\r\n if ($scope.appInfo.paperwork.deliveries.appForm)\r\n {\r\n $scope.resetDirtyFlags($scope.appInfo.paperwork.deliveries.appForm);\r\n }\r\n\r\n // if current view is record selector then don't save fuel delivery. just navigate to selected path\r\n if ($scope.currentView === 0)\r\n {\r\n if (path.length > 0)\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, false, isPrevious));\r\n return;\r\n }\r\n }\r\n\r\n angular.copy($scope.deliveriesGridDS.data().toJSON(), $scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryProducts);\r\n\r\n // if new delivery then set entry user id\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Key <= 0)\r\n {\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.EntryUserID = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress;\r\n }\r\n var paperworkDeliveryHeader =\r\n {\r\n PaperworkBatchKey: $scope.appInfo.paperwork.batch.Key,\r\n AppKey: $scope.locationInfo.sideMenuData.paperwork.deliveries.Key\r\n };\r\n\r\n PaperworkDeliveriesService.savePaperworkDelivery(paperworkDeliveryHeader, $scope.appInfo.paperwork.deliveries.fuelDelivery)\r\n .then(function (data)\r\n {\r\n data.FuelDelivery.LiftDatetime = globalizationSvc.formatDateTime(data.FuelDelivery.LiftDatetime, 'g');\r\n data.FuelDelivery.DelivDateTime = globalizationSvc.formatDateTime(data.FuelDelivery.DelivDateTime, 'g');\r\n\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = data.FuelDelivery;\r\n\r\n $scope.appInfo.paperwork.deliveries.deliveriesList = data.FuelDeliveriesList;\r\n\r\n // initalize product filtered tanks list\r\n angular.forEach($scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryProducts, function (deliveryProduct)\r\n {\r\n deliveryProduct.FilteredTanksList = $scope.getFilteredTanksList(deliveryProduct.ProdKey);\r\n deliveryProduct.SelectedTank = deliveryProduct.FilteredTanksList.find({TankNo: deliveryProduct.FuelDeliveryTanks[0].TankNo});\r\n });\r\n\r\n var grid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n grid.dataSource.data(data.FuelDelivery.FuelDeliveryProducts);\r\n\r\n $scope.validateDeliveries();\r\n\r\n if (submit)\r\n {\r\n $scope.submitPaperwork(true);\r\n return;\r\n }\r\n if (close)\r\n {\r\n $scope.submitPaperwork(false);\r\n return;\r\n }\r\n if (path.length > 0)\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, false, isPrevious));\r\n }\r\n });\r\n };\r\n\r\n $scope.displayDeleteConfirmationModal = function ()\r\n {\r\n\r\n $scope.deleteConfirmationModalDeferred = $q.defer();\r\n\r\n $scope.showDeleteConfirmationModal = true;\r\n\r\n return $scope.deleteConfirmationModalDeferred.promise;\r\n\r\n };\r\n\r\n $scope.deleteDeliveryHandler = function (deliveryListItem)\r\n {\r\n $scope.displayDeleteConfirmationModal().then(function ()\r\n { // ok handler\r\n $scope.deletePaperworkDelivery(deliveryListItem);\r\n $scope.deleteConfirmationModalDeferred = undefined;\r\n $scope.showDeleteConfirmationModal = false;\r\n }, function ()\r\n { // cancel handler\r\n $scope.deleteConfirmationModalDeferred = undefined;\r\n $scope.showDeleteConfirmationModal = false;\r\n });\r\n };\r\n\r\n $scope.deletePaperworkDelivery = function (deliveryListItem)\r\n {\r\n PaperworkDeliveriesService.deletePaperworkDelivery(deliveryListItem, $scope.appInfo.paperwork.batch.Key)\r\n .then(function (data)\r\n {\r\n //update record selector list\r\n $scope.appInfo.paperwork.deliveries.deliveriesList = data.FuelDeliveriesList;\r\n }\r\n );\r\n };\r\n\r\n $scope.displayCommentsModalForm = function ()\r\n {\r\n $scope.showCommentsEntryModalForm = true;\r\n };\r\n\r\n $scope.perLoadFreightModalFormDeferred = undefined;\r\n\r\n $scope.displayPerLoadFreightModalForm = function ()\r\n {\r\n\r\n $scope.perLoadFreightModalFormDeferred = $q.defer();\r\n\r\n $scope.freightModalFormDelegate.fuelDeliveryFreight = angular.copy($scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryFreight);\r\n\r\n $scope.showPerLoadFreightEntryModalForm = true;\r\n\r\n return $scope.perLoadFreightModalFormDeferred.promise;\r\n\r\n };\r\n\r\n $scope.editPerLoadFreight = function ()\r\n {\r\n $scope.displayPerLoadFreightModalForm().then(function ()\r\n { // ok handler\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryFreight = angular.copy($scope.freightModalFormDelegate.fuelDeliveryFreight);\r\n $scope.freightModalFormDelegate.fuelDeliveryFreight = {};\r\n $scope.perLoadFreightModalFormDeferred = undefined;\r\n $scope.showPerLoadFreightEntryModalForm = false;\r\n }, function ()\r\n { // cancel handler\r\n $scope.perLoadFreightModalFormDeferred = undefined;\r\n $scope.showPerLoadFreightEntryModalForm = false;\r\n });\r\n };\r\n\r\n $scope.hideModals = function ()\r\n {\r\n $scope.showDeleteConfirmationModal = false;\r\n $scope.showCommentsEntryModalForm = false;\r\n $scope.showPerLoadFreightEntryModalForm = false;\r\n validatorSvc.clearAllValidations();\r\n };\r\n\r\n $scope.getFilteredTanksList = function (productKey)\r\n {\r\n var tanks = $scope.appInfo.paperwork.deliveries.context.SiteTanks;\r\n var siteTankProductLookup = $scope.appInfo.paperwork.deliveries.context.SiteTankProductLookup;\r\n\r\n var data = [];\r\n\r\n angular.forEach(siteTankProductLookup.findAll({ProductKey: productKey}), function (authorizedTank)\r\n {\r\n\r\n var tank = tanks.find({ProductKey: authorizedTank.TankProductKey});\r\n\r\n if (angular.isDefined(tank))\r\n {\r\n data.push(tank);\r\n }\r\n });\r\n\r\n return data;\r\n };\r\n\r\n $scope.deliveryIsEditable = function (delivery)\r\n {\r\n if (delivery === undefined)\r\n {\r\n delivery = $scope.appInfo.paperwork.deliveries.fuelDelivery;\r\n }\r\n\r\n if ($(\"#deliveriesGrid\").attr(\"k-editable\") === \"false\")\r\n {\r\n return false;\r\n } else if (delivery.Status > 2) { // scheduled (0) or verified (1) or entered (2) = true else false\r\n return false;\r\n } else if ($scope.appInfo.paperwork.context.lockPaperworkAfterDru && delivery.DRUPosted) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n };\r\n\r\n var deliveryGridRowValidation =\r\n {\r\n validator: function (deliveryProduct, parms)\r\n {\r\n var isValid = true;\r\n\r\n var $row = $(\"#deliveriesGrid\").data(\"kendoGrid\").tbody.find(\"tr[data-uid='\" + deliveryProduct.uid + \"']\");\r\n\r\n //gross quantity validation\r\n if ($scope.appInfo.paperwork.deliveries.context.ShowGrossUnits)\r\n {\r\n\r\n var errorGrossQty = [], warningGrossQty = [];\r\n\r\n if (deliveryProduct.DelivGrossQty === 0)\r\n {\r\n isValid = false;\r\n\r\n errorGrossQty.push(localStrings.getLocalizedString(\"GTZeroError\"));\r\n }\r\n\r\n if ((deliveryProduct.DelivGrossQty > 0) && (deliveryProduct.DelivGrossQty > deliveryProduct.SelectedTank.Capacity ))\r\n {\r\n\r\n warningGrossQty.push(localStrings.getLocalizedString(\"QuantityExceedsTank\"));\r\n\r\n }\r\n\r\n $scope.processGridColumnValidationNotification($row, 'DelivGrossQty', errorGrossQty, warningGrossQty);\r\n }\r\n\r\n //net quantity validation\r\n if ($scope.appInfo.paperwork.deliveries.context.ShowNetUnits)\r\n {\r\n\r\n var errorNetQty = [], warningNetQty = [];\r\n\r\n if (deliveryProduct.DelivNetQty === 0)\r\n {\r\n isValid = false;\r\n\r\n errorNetQty.push(localStrings.getLocalizedString(\"GTZeroError\"));\r\n }\r\n\r\n if ((deliveryProduct.DelivNetQty > 0) && (deliveryProduct.DelivNetQty > deliveryProduct.SelectedTank.Capacity ))\r\n {\r\n warningNetQty.push(localStrings.getLocalizedString(\"QuantityExceedsTank\"));\r\n }\r\n\r\n $scope.processGridColumnValidationNotification($row, 'DelivNetQty', errorNetQty, warningNetQty);\r\n }\r\n\r\n return isValid;\r\n }\r\n };\r\n\r\n $scope.showErrorTooltip = function (el) {\r\n //$scope.setupGridColumnValidationNotificationUI(el);\r\n\r\n var fieldName = el.attr('data-field');\r\n\r\n el.qtip({\r\n id: \"qtip-\" + fieldName,\r\n content: {\r\n text: \"\"\r\n },\r\n position: {\r\n adjust: {\r\n x: 15, y: -30\r\n }\r\n },\r\n style: {\r\n classes: \"toolTipStyle\"\r\n }\r\n });\r\n\r\n el.qtip('disable', true);\r\n\r\n el.qtip('option', 'content.text', localStrings.getLocalizedString('DelivDetailsRequired'));\r\n el.qtip('option', 'style.classes', 'toolTipStyle-error');\r\n el.qtip('disable', false);\r\n };\r\n\r\n $scope.validateDeliveries = function ()\r\n {\r\n // checks if control is not null, undefined and so on ...\r\n if (!$(\"#deliveriesGrid\").data(\"kendoGrid\"))\r\n return true;\r\n\r\n var deliveriesGridRowsCount = $(\"#deliveriesGrid\").data(\"kendoGrid\").dataSource.data().length;\r\n\r\n if (deliveriesGridRowsCount === 0 && !$(\"#appForm\").hasClass(\"ng-dirty\")) {\r\n return true;\r\n }\r\n \r\n if (!validatorSvc.executeValidations()) {\r\n return deliveriesGridRowsCount === 0;\r\n }\r\n\r\n var $gridActionFooter = $(\"#petronetGridActionFooterRow\");\r\n var $gridActionFooterRowMiddle = $(\"#petronetGridActionFooterRowMiddle\");\r\n\r\n $gridActionFooter.removeClass(\"td-error\");\r\n $gridActionFooterRowMiddle.removeClass(\"td-error\");\r\n\r\n var isValid = true;\r\n\r\n if (deliveriesGridRowsCount === 0) {\r\n\r\n $gridActionFooter.addClass(\"td-error\");\r\n $gridActionFooterRowMiddle.addClass(\"td-error\");\r\n\r\n $scope.showErrorTooltip($gridActionFooter);\r\n $scope.showErrorTooltip($gridActionFooterRowMiddle);\r\n\r\n return false;\r\n }\r\n\r\n var deliveriesGrid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n\r\n angular.forEach(deliveriesGrid.dataSource.data(), function (delivery)\r\n {\r\n isValid = isValid && deliveryGridRowValidation.validator(delivery);\r\n });\r\n\r\n return isValid;\r\n };\r\n\r\n $scope.getStatusDescription = function ()\r\n {\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 0)\r\n {\r\n return 'Scheduled';\r\n } else if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 1)\r\n {\r\n return 'Verified';\r\n }\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 2)\r\n {\r\n return 'Entered';\r\n }\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 3)\r\n {\r\n return 'Posted';\r\n }\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 4)\r\n {\r\n return 'Confirmed';\r\n }\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 5)\r\n {\r\n return 'Reconciled';\r\n }\r\n };\r\n\r\n var liftDateValidation =\r\n {\r\n name: 'validateLiftDate',\r\n validationMessage: '',\r\n validationMessageWrn: '',\r\n validatorError: function (liftDateTime, parms)\r\n {\r\n var isValid = true;\r\n\r\n return isValid;\r\n },\r\n validatorWarning: function (liftDateTime, parms)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(liftDateTime))\r\n {\r\n return true;\r\n }\r\n\r\n var hasWarning = false;\r\n var warningMsg = '';\r\n\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.DelivDateTime > liftDateTime)\r\n {\r\n warningMsg = localStrings.getLocalizedString(\"DeliveryDateNot\");\r\n hasWarning = true;\r\n }\r\n\r\n var maxDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), 1);\r\n var minDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), -1);\r\n\r\n if ((liftDateTime > $scope.formatDateTime(maxDateTime)) || (liftDateTime < $scope.formatDateTime(minDateTime)))\r\n {\r\n if (warningMsg !== '')\r\n {\r\n warningMsg = warningMsg + '\\r\\n';\r\n }\r\n warningMsg = warningMsg + localStrings.getLocalizedString(\"LiftDateNotWithin\");\r\n hasWarning = true;\r\n }\r\n\r\n this.validationMessageWrn = warningMsg;\r\n\r\n return !hasWarning;\r\n }\r\n };\r\n\r\n $scope.validateLiftDate = new pdi.ng.validate.PdiValidation(liftDateValidation);\r\n\r\n var deliveryDateValidation =\r\n {\r\n name: 'validateDeliveryDate',\r\n validationMessage: '',\r\n validationMessageWrn: '',\r\n validatorError: function (deliveryDateTime, parms)\r\n {\r\n var isValid = true;\r\n\r\n return isValid;\r\n },\r\n validatorWarning: function (deliveryDateTime, parms)\r\n {\r\n var hasWarning = false;\r\n\r\n var maxDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), 1);\r\n var minDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), -1);\r\n\r\n if ((deliveryDateTime > $scope.formatDateTime(maxDateTime)) || (deliveryDateTime < $scope.formatDateTime(minDateTime)))\r\n {\r\n this.validationMessageWrn = localStrings.getLocalizedString(\"DeliveryDateNotWithin\");\r\n hasWarning = true;\r\n }\r\n\r\n return !hasWarning;\r\n }\r\n };\r\n\r\n $scope.validateDeliveryDate = new pdi.ng.validate.PdiValidation(deliveryDateValidation);\r\n\r\n\r\n $scope.viewDelivery = function (deliveryKey)\r\n {\r\n PaperworkDeliveriesService.getDelivery(\r\n deliveryKey,\r\n $scope.appInfo.paperwork.batch.Key\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = {};\r\n\r\n data.LiftDatetime = globalizationSvc.formatDateTime(data.LiftDatetime, 'g');\r\n data.DelivDateTime = globalizationSvc.formatDateTime(data.DelivDateTime, 'g');\r\n\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = data;\r\n\r\n $scope.freightModalFormDelegate.fuelDeliveryFreight = $scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryFreight;\r\n\r\n // initalize product filtered tanks list\r\n angular.forEach($scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryProducts, function (deliveryProduct)\r\n {\r\n deliveryProduct.FilteredTanksList = $scope.getFilteredTanksList(deliveryProduct.ProdKey);\r\n deliveryProduct.SelectedTank = deliveryProduct.FilteredTanksList.find({TankNo: deliveryProduct.FuelDeliveryTanks[0].TankNo});\r\n });\r\n\r\n $scope.initializeDeliveriesGrid();\r\n\r\n $scope.changeView(1);\r\n\r\n });\r\n };\r\n\r\n $scope.editPerLoadFreightOkHandler = function ()\r\n {\r\n\r\n if (!validatorSvc.executeValidationsForScope($scope.freightModalFormDelegate))\r\n {\r\n return;\r\n }\r\n\r\n // workaround for the above code does not set the validatity of the model correctly. maybe a timing issue\r\n $timeout(function ()\r\n {\r\n\r\n var hasError = $(\"#deliveryFreightTable\").find(\".td-error\");\r\n\r\n if (hasError.length > 0)\r\n {\r\n return;\r\n }\r\n\r\n $scope.perLoadFreightModalFormDeferred.resolve();\r\n }, 100);\r\n };\r\n\r\n $scope.editPerLoadFreightCancelHandler = function ()\r\n {\r\n $scope.perLoadFreightModalFormDeferred.reject();\r\n };\r\n\r\n })\r\n .controller('enterPaperworkDeliveriesFreightModalCtrl', function ($scope, $rootScope, $routeParams, PaperworkService, $filter,\r\n PaperworkDeliveriesService, $location, WebFunctions, validatorSvc, $timeout, localizationSvc, globalizationSvc)\r\n {\r\n 'use strict';\r\n\r\n $scope.modalInfo = {};\r\n $scope.kInputOptions = {\r\n culture: globalizationSvc.getLocale(),\r\n format: \"n\",\r\n decimals: 2,\r\n spinners: false\r\n };\r\n\r\n var parentController = angular.element('#deliveriesForm').scope();\r\n\r\n parentController.freightModalFormDelegate = $scope;\r\n\r\n $scope.fuelDeliveryFreight = {};\r\n\r\n $scope.addDeliveryFreightRow = function ()\r\n {\r\n var newFreightRow = {\r\n \"CalcAmt\": 0,\r\n \"DelProdKey\": null,\r\n \"FrtVndInvKey\": null,\r\n \"FrtVndInvPndKey\": null,\r\n \"FrtRuleKey\": null,\r\n \"FuelDelKey\": $scope.appInfo.paperwork.deliveries.fuelDelivery.Key,\r\n \"InvcAmt\": 0,\r\n \"Key\": 0,\r\n \"Override\": -1,\r\n \"ReconUserID\": null,\r\n \"Reconciled\": 0,\r\n \"Type\": 6,\r\n \"Timestamp\": \"\"\r\n };\r\n\r\n $scope.fuelDeliveryFreight.push(newFreightRow);\r\n };\r\n\r\n\r\n var freightRowValidation =\r\n {\r\n name: 'validateFreightRow',\r\n validationMessage: '',\r\n validatorError: function (freight, parms)\r\n {\r\n var isValid = true;\r\n\r\n //reset Errors\r\n freight.freightRuleValidation = {hasErrors: false, errorDescription: \"\"};\r\n\r\n if (angular.isUndefinedOrNullOrEmpty(freight.FrtRuleKey))\r\n {\r\n isValid = false;\r\n freight.freightRuleValidation = { hasErrors: true, errorDescription: localStrings.getLocalizedString(\"Required\") };\r\n }\r\n\r\n if (isValid)\r\n { //cleanup view model\r\n freight.freightRuleValidation = {};\r\n }\r\n\r\n return isValid;\r\n }\r\n };\r\n\r\n $scope.validateFreightRow = new pdi.ng.validate.PdiValidation(freightRowValidation);\r\n\r\n })\r\n .controller('enterPaperworkDealerFormsCtrl', function ($scope, $rootScope, $routeParams, PaperworkService, localizationSvc,$filter, PaperworkDealerFormsService, $location, WebFunctions, $timeout, templates, globalizationSvc, setupNav)\r\n {\r\n 'use strict';\r\n $scope.dealerFormsLoaded = false;\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler()\r\n {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n $scope.appInfo.paperwork.viewOnly = $location.$$path.indexOf('/ViewPaperworkDealerForms/') > -1;\r\n\r\n $scope.formsEditable = true;\r\n\r\n if ($routeParams.paperworkKey)\r\n {\r\n $scope.appInfo.paperwork.paperworkKey = $routeParams.paperworkKey;\r\n }\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n $scope.appInfo.paperwork.batch = {};\r\n\r\n // TODO To add the ability to add this to every possible field, we would run a foreach for each field in loadDealerForms and then attach this with their precision\r\n $scope.appInfo.paperwork.kOptions = {\r\n culture: globalizationSvc.getLocale(),\r\n format: \"n\",\r\n decimals: 2,\r\n spinners: false,\r\n min: -999999999\r\n };\r\n\r\n if (!$scope.appInfo.paperwork.context)\r\n {\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true).then(\r\n function (data)\r\n {\r\n $scope.appInfo.paperwork.context = {};\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n }\r\n );\r\n }\r\n\r\n if ($scope.appInfo.paperwork.paperworkKey > 0)\r\n {\r\n //We are loading a known existing paperwork batch\r\n PaperworkService.OpenPaperworkBatchByKey(\r\n $scope.appInfo.paperwork.paperworkKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n $scope.appInfo.paperwork.viewOnly\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n \r\n // resolve if this is the first or last page\r\n var res = setupNav.firstLastPage('DRDFE',$scope.appInfo.paperwork.apps);\r\n $scope.locationInfo.sideMenuData.isFirstPage = res.isFirstPage;\r\n $scope.locationInfo.sideMenuData.isLastPage = res.isLastPage;\r\n \r\n $rootScope.$broadcast('event:PaperworkLoaded', $scope.appInfo.paperwork.viewOnly, $scope.appInfo.paperwork.paperworkKey);\r\n\r\n var nextApp = true;\r\n angular.forEach($scope.appInfo.paperwork.apps, function (app, index)\r\n {\r\n if (app.MenuCode === 'DRDFE')\r\n {\r\n $scope.loadDealerForms();\r\n nextApp = false;\r\n }\r\n });\r\n if (nextApp)\r\n {\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n }\r\n }, function ()\r\n {\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n });\r\n } else\r\n {\r\n //todo: goback...\r\n }\r\n $scope.locationInfo.sideMenuData.pwSubMenu = '3';\r\n };\r\n\r\n var newPWBatchLoadedListener = $rootScope.$on('event:NewPaperworkBatchLoaded', function (event, data)\r\n {\r\n $scope.loadDealerForms();\r\n });\r\n\r\n $scope.$on('$destroy', newPWBatchLoadedListener);\r\n\r\n $scope.loadDealerForms = function ()\r\n {\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.batch.SiteKey)\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n });\r\n\r\n PaperworkDealerFormsService.loadDealerForms($scope.appInfo.paperwork.batch.Key).then(function (data)\r\n {\r\n // if(data.count == 0){\r\n // TODO: No forms, do something...\r\n // }\r\n $scope.appInfo.paperwork.dealerForms = data.DealerForms;\r\n $scope.setupDisplayValues();\r\n\r\n $scope.dealerFormsLoaded = true;\r\n\r\n $scope.formsEditable = !($scope.appInfo.paperwork.context.lockPaperworkAfterDru && $scope.appInfo.paperwork.dealerForms.Header.Updated);\r\n\r\n $timeout(function(){\r\n if (!$scope.formsEditable) {\r\n $('#sectionDealerForms input').attr(\"disabled\", true);\r\n }\r\n });\r\n\r\n $scope.updateDealerForms();\r\n $scope.setFocus();\r\n });\r\n };\r\n\r\n $scope.setupDisplayValues = function () {\r\n $scope.appInfo.paperwork.dealerForms.AllFieldsDisplay = {};\r\n\r\n angular.forEach($scope.appInfo.paperwork.dealerForms.AllFields, function (field, index) {\r\n var newObject = {};\r\n\r\n angular.forEach(Object.keys(field), function (property, index) {\r\n if (property === \"DataIDValue\")\r\n newObject[property] = globalizationSvc.formatNumeric(field[property], \"n2\");\r\n });\r\n\r\n $scope.appInfo.paperwork.dealerForms.AllFieldsDisplay[field.Key] = newObject;\r\n });\r\n };\r\n\r\n var PageStage = $rootScope.$on('event:PageStage', function (event, args)\r\n {\r\n if (args === 'DRDFE' && !$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.saveDealerForms('', false, true);\r\n } \r\n });\r\n $scope.$on('$destroy', PageStage);\r\n\r\n $scope.next = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly)\r\n $scope.saveDealerForms(path, false, true);\r\n else\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, false));\r\n };\r\n\r\n $scope.previous = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly)\r\n $scope.saveDealerForms(path, false, false, true);\r\n else\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, true));\r\n };\r\n\r\n $scope.close = function ()\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.saveDealerForms('', false, false);\r\n } else\r\n {\r\n $scope.goTo(\"/Paperwork/EnterPaperwork/\");\r\n }\r\n };\r\n\r\n $scope.submit = function ()\r\n {\r\n $scope.saveDealerForms('', true, false);\r\n };\r\n\r\n $scope.processSubmit = function (submit) {\r\n var submitPaperworkCmdParms =\r\n {\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n EmailAddress: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SubmitPaperwork: submit,\r\n PreviouslySubmitted: $scope.appInfo.paperwork.batch.HasBeenSubmitted\r\n };\r\n\r\n PaperworkService.GetPaperworkBatchErrorWarning(submitPaperworkCmdParms).then(function (data) {\r\n //If warnings - show confirm dialog\r\n if (data.HasWarnings) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Warnings[0])) {\r\n $scope.notifier.show(data.Warnings[0], \"warning\");\r\n\r\n var yes = function () {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n };\r\n\r\n $scope.modalifier.confirm(data.Warnings[0] + \"
    \" + localStrings.getLocalizedString(\"WishToContinue\"), yes);\r\n }\r\n }\r\n else {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n }\r\n });\r\n };\r\n\r\n $scope.submitPaperwork = function (submit)\r\n {\r\n var fuelMetersAppInfo = $scope.appInfo.paperwork.apps[0];\r\n\r\n //If we have fuelMeters and fuelMeters are required, but not saved; then throw error\r\n if (fuelMetersAppInfo.HasData === 0 && fuelMetersAppInfo.IsRequired !== 0) {\r\n $timeout(function () {\r\n $scope.modalifier.showSavedError();\r\n }, 100);\r\n return;\r\n }\r\n\r\n $scope.processSubmit(submit);\r\n };\r\n\r\n $scope.saveDealerForms = function (path, submit, close, isPrevious)\r\n {\r\n isPrevious = isPrevious ? isPrevious : false;\r\n\r\n if ($scope.appInfo.paperwork.dealerForms) {\r\n $scope.appInfo.paperwork.dealerForms.Header.UserName = $scope.appInfo.paperwork.form.UserName;\r\n $scope.appInfo.paperwork.form.Caption = $scope.appInfo.paperwork.dealerForms.DealerFormVersion.Caption;\r\n PaperworkDealerFormsService.saveDealerForms($scope.appInfo.paperwork.dealerForms.Header,\r\n $scope.appInfo.paperwork.dealerForms.AllFields).then(function (data) {\r\n $scope.appInfo.paperwork.dealerForms = data.DealerForms;\r\n $scope.setupDisplayValues();\r\n\r\n if (submit) {\r\n $scope.submitPaperwork(true);\r\n return;\r\n } else if (close) {\r\n $scope.submitPaperwork(false);\r\n return;\r\n }\r\n });\r\n }\r\n if (path.length > 0) {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, false, isPrevious));\r\n }\r\n };\r\n\r\n $scope.setFocus = function ()\r\n {\r\n var focusSet = false;\r\n for (var x = 0; x < $scope.appInfo.paperwork.dealerForms.Rows[0].length; x++)\r\n {\r\n for (var y = 0; y < $scope.appInfo.paperwork.dealerForms.Rows.length; y++)\r\n {\r\n var key = $scope.appInfo.paperwork.dealerForms.Rows[y][x];\r\n if (key > 0)\r\n {\r\n if (!$scope.appInfo.paperwork.dealerForms.AllFields[key].DisplayOnly && !$scope.appInfo.paperwork.dealerForms.AllFields[key].IsCalculated && !focusSet)\r\n {\r\n $scope.appInfo.paperwork.dealerForms.AllFields[key].setFocus = true;\r\n focusSet = true;\r\n }\r\n else\r\n $scope.appInfo.paperwork.dealerForms.AllFields[key].setFocus = false;\r\n }\r\n }\r\n }\r\n };\r\n\r\n $scope.onDealerFormChange = function (index, value) {\r\n var dataIDValue = $scope.appInfo.paperwork.dealerForms.AllFieldsDisplay[index].DataIDValue;\r\n $scope.appInfo.paperwork.dealerForms.AllFields[index].DataIDValue = isNaN(parseFloat(dataIDValue)) ? 0.00 : parseFloat(globalizationSvc.convertStringToNumber($scope.appInfo.paperwork.dealerForms.AllFieldsDisplay[index].DataIDValue));\r\n };\r\n\r\n $scope.updateDealerForms = function ()\r\n {\r\n angular.forEach($scope.appInfo.paperwork.dealerForms.CalcFields, function (calcField, index)\r\n {//look through all the calc field references\r\n \r\n $scope.appInfo.paperwork.dealerForms.AllFields[calcField.Key].DataIDValue = 0;//We actually store all values in AllFields collection\r\n angular.forEach($scope.appInfo.paperwork.dealerForms.Calcuations, function (calc, index)\r\n {\r\n if (calc.ResultTypeKey === calcField.TypeKey)\r\n {//If the result of the calculation is stored on this calc field then...\r\n angular.forEach($scope.appInfo.paperwork.dealerForms.AllFields, function (field, index)\r\n {\r\n $scope.appInfo.paperwork.dealerForms.AllFieldsDisplay[index].DataIDValue = globalizationSvc.formatNumeric($scope.appInfo.paperwork.dealerForms.AllFields[index].DataIDValue, \"n2\");\r\n\r\n if (calc.CalcTypeKey === field.TypeKey)\r\n {//If this field is the calc type from this calculation then\r\n if (calc.Operation === 0)\r\n {//Add\r\n $scope.appInfo.paperwork.dealerForms.AllFields[calcField.Key].DataIDValue =\r\n $scope.appInfo.paperwork.dealerForms.AllFields[calcField.Key].DataIDValue +\r\n field.DataIDValue;//Store the data back in the AllFields collection.\r\n } else\r\n {//Subtract\r\n $scope.appInfo.paperwork.dealerForms.AllFields[calcField.Key].DataIDValue =\r\n $scope.appInfo.paperwork.dealerForms.AllFields[calcField.Key].DataIDValue -\r\n field.DataIDValue;//Store the data back in the AllFields collection.\r\n }\r\n }\r\n });\r\n }\r\n });\r\n });\r\n }; \r\n })\r\n .controller('inventorySummaryCtrl', function ($scope, $rootScope, WebFunctions, $timeout, templates)\r\n {\r\n 'use strict';\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler()\r\n {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '3';\r\n\r\n $timeout(function ()\r\n {\r\n var inventorySideMenuController = angular.element('#inventorySummarySideMenu').scope();\r\n\r\n inventorySideMenuController.setSiteAndDate();\r\n });\r\n\r\n\r\n };\r\n })\r\n .controller(\"paperworkReportsSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function () {\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 31;\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n };\r\n })\r\n .controller(\"paperworkReportSideMenuCtrl\", function ($scope, PaperworkService, PaperworkReportsService, validatorSvc, reportingService, globalizationSvc) {\r\n 'use strict';\r\n $scope.initialize = function () {\r\n\r\n if (!$scope.locationInfo.sideMenuData.subMenu) {\r\n $scope.goTo(\"/Paperwork/Reports\");\r\n return;\r\n }\r\n\r\n //There is a race condition when reloading the page\r\n //Check if the date selector is undefined, if it is then initialize it\r\n if (angular.isUndefinedOrNullOrEmpty($scope.dateSelector)) {\r\n $scope.initializeDateSelector();\r\n }\r\n\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.displaySelector = true;\r\n $scope.dateSelector.selection = 0;\r\n $scope.dateSelector.hideAllDays = true;\r\n\r\n var report = $scope.getReportFromSubMenu($scope.locationInfo.sideMenuData.subMenu);\r\n\r\n if (!report) {\r\n $scope.goTo(\"/Paperwork/Reports\");\r\n return;\r\n }\r\n\r\n PaperworkReportsService\r\n .getPaperworkReportSites(report.Name, $scope.appInfo.webUser.CurrentAuthorization.CustContKey, false)\r\n .then(function (data) {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkReportSites)) {\r\n $scope.appInfo.paperwork.reports.PaperworkReportSites = data.PaperworkReportSites;\r\n $scope.appInfo.paperwork.reports.site = data.PaperworkReportSites[0];\r\n }\r\n else {\r\n $scope.modalifier.showSetupError();\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.getReportFromSubMenu = function (subMenu) {\r\n if ($scope.appInfo.paperwork.reports.paperworkReports) {\r\n return $scope.appInfo.paperwork.reports.paperworkReports\r\n .filter(function (item) {\r\n return item.Name === subMenu;\r\n })[0];\r\n }\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args) {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format) {\r\n if (!validatorSvc.executeValidations()) {\r\n return;\r\n }\r\n\r\n var report = $scope.getReportFromSubMenu($scope.locationInfo.sideMenuData.subMenu);\r\n\r\n if (!report) {\r\n $scope.goTo(\"/Paperwork/Reports\");\r\n return;\r\n }\r\n\r\n PaperworkService\r\n .ValidatePaperworkSiteDateForContact(\r\n $scope.appInfo.paperwork.reports.site.Key,\r\n $scope.urlFormatDate($scope.dateSelector.startDate, true),\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n false)\r\n .then(function (data) {\r\n var qs = \"reportName=\" + report.Name +\r\n \"&reportSubjectArea=\" + report.SubjectArea +\r\n \"&isStoreReport=\" + \"1\" +\r\n \"&RP-Site=\" + $scope.appInfo.paperwork.reports.site.Id +\r\n \"&RP-BegDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-EndDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-Language=\" + globalizationSvc.getLocale().slice(0, 2) +\r\n \"&RP-UseLatest=\" + \"0\";\r\n\r\n if (format) {\r\n reportingService.exportReport(qs, format);\r\n }\r\n else {\r\n reportingService.renderReport(qs);\r\n }\r\n });\r\n };\r\n })\r\n .controller('paperworkReportCtrl', function ($scope, $rootScope, WebFunctions, templates) {\r\n 'use strict';\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler() {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function () {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry)) {\r\n $scope.goTo(\"/Home\");\r\n return;\r\n }\r\n\r\n if (!$scope.locationInfo.sideMenuData.subMenu) {\r\n $scope.goTo(\"/Paperwork/Reports\");\r\n return;\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 31;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportsSideMenu\");\r\n };\r\n })\r\n .controller(\"paperworkSideMenuCtrl\", function ($scope, PaperworkService, $rootScope, $interval)\r\n {\r\n 'use strict';\r\n\r\n /*\r\n Use $interval to periodically refresh the paperwork lock.\r\n When the user navigates away from the page the $destroy listener is triggered to kill off the $interval.\r\n Likewise, the $interval is stopped when the paperwork is submitted in services.paperwork.\r\n This is paired with a query in CustomerRepository in EntWeb that wipes out Petronet Locks if they are > 20 minutes old.\r\n */\r\n\r\n var intervalPromise;\r\n var paperworkBatchKey = 0;\r\n var intervalTime = 120000;//Every 2 mins\r\n\r\n function refreshLock() {\r\n if (paperworkBatchKey > 0) {\r\n console.log(\"Lock refreshed for Batch#\" + paperworkBatchKey);\r\n PaperworkService.RefreshPaperworkLock(paperworkBatchKey);\r\n }\r\n }\r\n\r\n $scope.startLockInterval = function (data) {\r\n $scope.stopLockInterval();\r\n intervalPromise = $interval(refreshLock, intervalTime);\r\n };\r\n\r\n $scope.stopLockInterval = function () {\r\n $interval.cancel(intervalPromise);\r\n };\r\n\r\n //When we load a paperwork batch, detect if we need to periodically refresh the lock\r\n var pwLockListener = $rootScope.$on('event:PaperworkLoaded', function (event, viewOnly, data) {\r\n if (!viewOnly && !angular.isUndefinedOrNullOrEmpty(data)) {\r\n paperworkBatchKey = data;\r\n $scope.startLockInterval();\r\n }\r\n });\r\n\r\n //When paperwork is submitted stop the lock refresh\r\n var pwSubmitListener = $rootScope.$on('event:PaperworkSubmitted', function () {\r\n $scope.stopLockInterval();\r\n paperworkBatchKey = 0;\r\n });\r\n\r\n //When we navigate away from this page destroy the listeners and interval\r\n $scope.$on('$destroy', function () {\r\n $scope.stopLockInterval();\r\n pwLockListener();\r\n pwSubmitListener();\r\n paperworkBatchKey = 0;\r\n });\r\n\r\n })\r\n .factory(\"setupNav\", [function($location)\r\n {\r\n\r\n return {\r\n getRouterPath: getRouterPath,\r\n navigateToPage: navigateToPage,\r\n firstLastPage: firstLastPage,\r\n getSinglePath: getSinglePath,\r\n resolveCurrentPageMenuCode: resolveCurrentPageMenuCode\r\n };\r\n\r\n function getRouterPath (app, paperworkKey, isView){\r\n if (app && paperworkKey) {\r\n var path = '';\r\n var pathMode = !isView?'Enter':'View';\r\n \r\n if (app.DealerFormVersionKey > 0 && !app.MenuCode) {\r\n app.MenuCode = 'DRDFE';\r\n }\r\n\r\n switch (app.MenuCode) {\r\n case 'DREFD':\r\n path = `/Paperwork/${pathMode}PaperworkDeliveries/` + paperworkKey;\r\n break;\r\n case 'DRDFE':\r\n path = `/Paperwork/${pathMode}PaperworkDealerForms/` + paperworkKey;\r\n break;\r\n case 'DREGS':\r\n path = `/Paperwork/${pathMode}PaperworkTanks/` + paperworkKey;\r\n break;\r\n case 'DREGM':\r\n path = `/Paperwork/${pathMode}Paperwork/` + paperworkKey;\r\n break;\r\n default:\r\n path = '/Home';\r\n }\r\n \r\n return path;\r\n }\r\n }\r\n\r\n function getSinglePath(menuCode, paperworkKey, isView, noKey){\r\n \r\n if (menuCode && paperworkKey) {\r\n var path = '';\r\n var pathMode = !isView?'Enter':'View';\r\n if (noKey) paperworkKey = '';\r\n\r\n switch (menuCode) {\r\n case 'DREFD':\r\n path = `/Paperwork/${pathMode}PaperworkDeliveries/` + paperworkKey;\r\n break;\r\n case 'DRDFE':\r\n path = `/Paperwork/${pathMode}PaperworkDealerForms/` + paperworkKey;\r\n break;\r\n case 'DREGS':\r\n path = `/Paperwork/${pathMode}PaperworkTanks/` + paperworkKey;\r\n break;\r\n case 'DREGM':\r\n path = `/Paperwork/${pathMode}Paperwork/` + paperworkKey;\r\n break;\r\n default:\r\n path = '/Home';\r\n }\r\n \r\n return path;\r\n }\r\n }\r\n\r\n function navigateToPage(currentPage, apps, paperworkKey, isView, isPrevious){\r\n if (!currentPage || !apps || !paperworkKey)\r\n return;\r\n\r\n // find current page based on the menu code\r\n var menuOrder = apps.findIndex(function(el){\r\n return el.MenuCode === currentPage;\r\n });\r\n\r\n return !isPrevious? getRouterPath(apps[menuOrder + 1], paperworkKey, isView): getRouterPath(apps[menuOrder - 1], paperworkKey, isView);\r\n }\r\n \r\n function firstLastPage (menuCode, apps){\r\n var result = {isFirstPage: false, isLastPage: false};\r\n apps.find(function(item){if (item.DealerFormVersionKey > 0) item.MenuCode = 'DRDFE';});\r\n apps[0].isFirstPage = true;\r\n apps[apps.length - 1].isLastPage = true;\r\n\r\n apps.forEach(function(element){\r\n if (element.MenuCode === menuCode) {\r\n result.isFirstPage = element.isFirstPage;\r\n result.isLastPage = element.isLastPage;\r\n }\r\n });\r\n\r\n return result;\r\n }\r\n\r\n function resolveCurrentPageMenuCode(path){\r\n var result = '';\r\n \r\n if (path.indexOf('/EnterPaperwork/') > -1) result = 'DREGM';\r\n if (path.indexOf('/EnterPaperworkDeliveries/') > -1) result = 'DREFD';\r\n if (path.indexOf('/EnterPaperworkTanks/') > -1) result = 'DREGS';\r\n if (path.indexOf('/EnterPaperworkDealerForms/') > -1) result = 'DRDFE';\r\n\r\n return result;\r\n } \r\n }]\r\n);\r\n","/**\r\n * Created by jvitoria on 1/6/2015.\r\n */\r\nangular.module('pnReportSettings', ['core.ajax'])\r\n .directive('reportSettings', ['ReportSettingsService', 'templates', 'localizationSvc', function (ReportSettingsService, templates, localizationSvc)\r\n {\r\n return {\r\n restrict: 'E',\r\n scope: {\r\n showSettingsBar: '@',\r\n allowLoad: '@',\r\n allowSave: '@',\r\n allowExport: '@',\r\n allowCsv: '@',\r\n allowXml: '@',\r\n allowPdf: '@',\r\n allowExcel: '@',\r\n exportReportData: '&',\r\n saveOptions: '='\r\n },\r\n controller: function ($rootScope, $scope)\r\n {\r\n $scope.initReportSettings = function ()\r\n {\r\n $scope.exportOptions = [];\r\n if ($scope.allowCsv !== 'false')\r\n { $scope.exportOptions.push({id: '2', name: 'CSV'}); }\r\n if ($scope.allowXml !== 'false')\r\n { $scope.exportOptions.push({id: '7', name: 'XML'}); }\r\n if ($scope.allowPdf !== 'false')\r\n { $scope.exportOptions.push({id: '1', name: 'PDF'}); }\r\n if ($scope.allowExcel !== 'false')\r\n { $scope.exportOptions.push({id: '3', name: 'Excel'}); }\r\n if ($scope.exportOptions.length > 0)\r\n { $scope.selectedExportOptions = $scope.exportOptions[0].id; }\r\n\r\n if (!$rootScope.reportSettings)\r\n {\r\n $rootScope.reportSettings = {loadOptions: {}, saveOptions: {}};\r\n }\r\n };\r\n },\r\n\r\n link: function (scope, element, attrs) {\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"ReportSettingsLocalization\");\r\n if (!attrs.showSettingsBar)\r\n { attrs.showSettingsBar = true; }\r\n if (!attrs.allowLoad)\r\n { attrs.allowLoad = true; }\r\n if (!attrs.allowSave)\r\n { attrs.allowSave = true; }\r\n if (!attrs.allowExport)\r\n { attrs.allowExport = true; }\r\n\r\n scope.modalInfo = {saveSettingsName: ''};\r\n scope.showModalLoad = false;\r\n scope.showModalSave = false;\r\n scope.showModalConfirmSave = false;\r\n scope.selectedKey = 0;\r\n scope.selectedReportContactKey = 0;\r\n scope.selectedDescription = \"\";\r\n\r\n scope.canDelete = function (key)\r\n {\r\n return scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustContKey === key;\r\n };\r\n\r\n scope.exportData = function ()\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(scope.exportReportData()))\r\n return;\r\n scope.exportReportData();\r\n };\r\n\r\n scope.applyReportSettings = function ()\r\n {\r\n if (scope.selectedKey === 0)\r\n {\r\n scope.$parent.notifier.show(localStrings.getLocalizedString(\"PleaseSelectReport\"), 'error');\r\n return;\r\n }\r\n scope.$root.reportSettings.unwrapReportSettings();\r\n scope.showModalLoad = false;\r\n };\r\n\r\n scope.deleteReportSettings = function (key)\r\n {\r\n var apply = function ()\r\n {\r\n ReportSettingsService.saveReportSettings\r\n (\r\n scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustKey,\r\n \"\",\r\n \"\",\r\n 8,\r\n scope.$root.reportSettings.reportKey,\r\n key\r\n ).then\r\n (function ()\r\n {\r\n scope.getReportSettings(true);\r\n });\r\n };\r\n\r\n scope.$parent.$parent.modalifier.confirm(localStrings.getLocalizedString(\"DeleteSelectedReportSettings\"), apply);\r\n };\r\n\r\n scope.getReportSettings = function (notify)\r\n {\r\n ReportSettingsService.getReportSettings(\r\n scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustKey,\r\n scope.$root.reportSettings.reportKey\r\n ).then\r\n (\r\n function (data)\r\n {\r\n scope.returnedReportSettings = data.ReportSettings;\r\n if (scope.returnedReportSettings.ARWebSettings.length === 0 && notify)\r\n scope.$parent.notifier.show(localStrings.getLocalizedString(\"SelectionCriteriaNoResults\"), 'warning');\r\n }\r\n );\r\n };\r\n\r\n scope.saveSettings = function ()\r\n {\r\n if (!scope.returnedReportSettings)\r\n scope.getReportSettings(false);\r\n scope.showModalSave = !scope.showModalSave;\r\n };\r\n\r\n scope.loadSettings = function ()\r\n {\r\n scope.getReportSettings(true);\r\n scope.showModalLoad = !scope.showModalLoad;\r\n };\r\n\r\n scope.saveConfirmReportSettings = function ()\r\n {\r\n scope.showModalSave = false;\r\n if (scope.selectedKey > 0 && scope.selectedDescription === scope.modalInfo.saveSettingsName)\r\n {\r\n scope.showModalConfirmSave = true;\r\n return;\r\n }\r\n scope.selectedKey = 0;\r\n scope.saveReportSettings();\r\n };\r\n\r\n scope.saveReportSettings = function ()\r\n {\r\n if (scope.selectedKey > 0)\r\n scope.deleteReportSettings(true);\r\n if (angular.isDefined(scope.$root.reportSettings.wrapReportSettings))\r\n {\r\n scope.$root.reportSettings.wrapReportSettings();\r\n ReportSettingsService.saveReportSettings\r\n (\r\n scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustKey,\r\n scope.modalInfo.saveSettingsName,\r\n scope.$root.reportSettings.saveOptions,\r\n 4,\r\n scope.$root.reportSettings.reportKey,\r\n -1\r\n );\r\n\r\n scope.showModalConfirmSave = false;\r\n scope.showModalSave = false;\r\n }\r\n else\r\n scope.$parent.notifier.show(localStrings.getLocalizedString(\"ProcessFailedError\"), 'error');\r\n };\r\n\r\n scope.selectKey = function (item)\r\n {\r\n scope.selectedKey = item.Key;\r\n scope.selectedDescription = item.Description;\r\n scope.modalInfo.saveSettingsName = item.Description;\r\n scope.modalInfo.saveSettingsKey = item.Key;\r\n\r\n scope.$root.reportSettings.loadOptions = angular.fromJson(item.Options);\r\n };\r\n },\r\n templateUrl: templates.getTemplate(\"ReportSettings\") //'reportSettings/reportSettings.tpl.html'\r\n };\r\n }])\r\n\r\n .factory('ReportSettingsService', function ($q, apiService)\r\n {\r\n return {\r\n getReportSettings: function (custKey, reportKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetReportSettings/',\r\n data: {\r\n CustKey: custKey,\r\n RptKey: reportKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.ErrorMessages);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n saveReportSettings: function (custContKey, custKey, description, options, recStatus, reportKey, settingsKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/saveReportSettings/',\r\n data: {\r\n CustContKey: custContKey,\r\n CustKey: custKey,\r\n Description: description,\r\n Options: angular.toJson(options, false),\r\n RecStatus: recStatus,\r\n ReportKey: reportKey,\r\n SettingsKey: settingsKey\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.ErrorMessages);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n });\r\n","/**\r\n * Created by rhampton on 2/26/14.\r\n */\r\nangular.module(\"pnAccountPayments\", ['ngSanitize', 'core.objects', 'services.payments', 'core.directives'])\r\n .config(function ($provide, $routeProvider, templateProvider)\r\n {\r\n //http://localhost/arcustweb/Templates/MakeAPayment\"\r\n\r\n $routeProvider.when(\"/Account/Payments/MakeAPayment\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"MakeAPayment\"),\r\n controller: \"MakeAPaymentCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/MakeAPayment/:paymentKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"MakeAPayment\"),\r\n controller: \"MakeAPaymentCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/AccountVerifyPayment\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AccountVerifyPayment\"),\r\n controller: \"VerifyPaymentCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Payments/AccountConfirmPayment\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AccountConfirmPayment\"),\r\n controller: \"ConfirmPaymentCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/ViewScheduledPayments\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewScheduledPayments\"),\r\n controller: \"ScheduledPaymentHistoryCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/ViewPaymentAccounts\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewPaymentAccounts\"),\r\n controller: \"PaymentAccountsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/EditPaymentAccount\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EditPaymentAccount\"),\r\n controller: \"EditAccountCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/EditPaymentAccount/:paymentAccountKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EditPaymentAccount\"),\r\n controller: \"EditAccountCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/VerifyPaymentAccount\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"VerifyPaymentAccount\"),\r\n controller: \"VerifyAccountCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/ConfirmPaymentAccount/:paymentAccountKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ConfirmPaymentAccount\"),\r\n controller: \"ConfirmAccountCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/PaymentAccountVerification/:paymentAccountKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PaymentAccountVerification\"),\r\n controller: \"AccountVerificationCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/PaymentAccountVerificationVerify/:paymentAccountKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PaymentAccountVerificationVerify\"),\r\n controller: \"AccountVerificationVerificationCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/PaymentAccountVerificationConfirmation/:paymentAccountKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PaymentAccountVerificationConfirmation\"),\r\n controller: \"AccountVerificationConfirmationCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/TermsAndConditions/\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TermsAndConditions\"),\r\n controller: \"TermsAndConditionsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/PaymentAccountVerificationFailure/\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PaymentAccountVerificationFailure\"),\r\n controller: \"AccountVerificationFailCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n ;\r\n })\r\n .controller(\"TermsAndConditionsCtrl\", function ($scope, $http, $q, $routeParams, $filter, PaymentService, validatorSvc, WebFunctions, templates, localStrings)\r\n {\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPayments))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenuData = {};\r\n if ($scope.checkCurrentUserPermission($scope.webFunctions.AddandEditWebPayments))\r\n $scope.locationInfo.sideMenuData.subMenu = '4';\r\n else\r\n $scope.locationInfo.sideMenuData.subMenu = '5';\r\n\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n PaymentService.getTermsAndConditions($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms).then(function (data)\r\n {\r\n $scope.theTermsAndConditions = data;\r\n });\r\n };\r\n\r\n $scope.declineTerms = function ()\r\n {\r\n $scope.goTo(\"/Home\");\r\n };\r\n\r\n $scope.acceptTerms = function ()\r\n {\r\n if (!$scope.agreeToTerms)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"PleaseAcceptTermsConditions\"), 'error');\r\n return;\r\n }\r\n\r\n PaymentService.acceptTermsAndConditions(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings = data.CustomerWebPaymentSettings;\r\n if ($scope.checkCurrentUserPermission($scope.webFunctions.AddandEditWebPayments) &&\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.ActiveAccountCount > 0)\r\n $scope.goTo('/Account/Payments/ViewScheduledPayments');\r\n else if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.ActiveAccountCount > 0)\r\n $scope.goTo('/Account/Payments/ViewPaymentAccounts');\r\n else\r\n $scope.goTo('/Account/Payments/EditPaymentAccount');\r\n });\r\n };\r\n\r\n })\r\n .controller(\"MakeAPaymentCtrl\", function ($scope, $http, $q, $routeParams, $filter, PaymentService, validatorSvc, WebFunctions, templates, localStrings, localizationSvc, globalizationSvc, $rootScope)\r\n {\r\n 'use strict';\r\n $scope.paymentKey = 0;\r\n $scope.customText = \"\";\r\n $scope.kendo = {};\r\n\r\n $scope.kendo.invoicesGrid = {};\r\n $scope.kendo.invoicesGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"Selected\",\r\n width: 35,\r\n attributes: {class: \"alignCenter\"},\r\n filterable: false,\r\n sortable: false,\r\n headerTemplate: \"\",\r\n template: \"\"\r\n },\r\n {\r\n field: \"DueDate1\",\r\n title: localStrings.getLocalizedString(\"DueDate\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Balance\",\r\n title: localStrings.getLocalizedString(\"AmtDue\"),\r\n format: \"{0:c}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"RefNo\",\r\n title: localStrings.getLocalizedString(\"InvoiceNum\"),\r\n attributes: {class: \"alignLeftt\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"InvoiceDate\",\r\n title: localStrings.getLocalizedString(\"InvoiceDate\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Amount\",\r\n title: localStrings.getLocalizedString(\"OrigAmt\"),\r\n format: \"{0:c}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n }\r\n ],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n $scope.kendo.invoicesGridInit = function (ds)\r\n {\r\n ds.each(function (charge)\r\n {\r\n charge.DueDate1 = Date.create(charge.DueDate1).format('{MM}/{dd}/{yyyy}');\r\n charge.InvoiceDate = Date.create(charge.InvoiceDate).format('{MM}/{dd}/{yyyy}');\r\n charge.Balance = globalizationSvc.formatCurrency(charge.Balance);\r\n charge.Amount = globalizationSvc.formatCurrency(charge.Amount);\r\n });\r\n\r\n $scope.kendo.invoicesGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.invoicesGridDS.read();\r\n $scope.kendo.invoicesGrid.dataSource.data($scope.kendo.invoicesGridDS.data());\r\n };\r\n $scope.kendo.creditsGrid = {};\r\n $scope.kendo.creditsGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"Selected\",\r\n width: 35,\r\n attributes: {class: \"alignCenter\"},\r\n filterable: false,\r\n sortable: false,\r\n headerTemplate: \"\",\r\n template: \"\"\r\n },\r\n {\r\n field: \"RefDate\",\r\n title: localStrings.getLocalizedString(\"Date\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"TranCodeDescription\",\r\n title: localStrings.getLocalizedString(\"PaymentType\"),\r\n attributes: {class: \"alignLeftt\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"UnAppAmount\",\r\n title: localStrings.getLocalizedString(\"Amt\"),\r\n format: \"{0:c}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"RefNo\",\r\n title: localStrings.getLocalizedString(\"ReferenceNum\"),\r\n attributes: {class: \"alignLeftt\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n }\r\n ],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n $scope.kendo.creditsGridInit = function (ds)\r\n {\r\n ds.each(function (charge)\r\n {\r\n charge.RefDate = Date.create(charge.RefDate).format('{MM}/{dd}/{yyyy}');\r\n charge.UnAppAmount = globalizationSvc.formatCurrency(charge.UnAppAmount);\r\n });\r\n\r\n $scope.kendo.creditsGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.creditsGridDS.read();\r\n $scope.kendo.creditsGrid.dataSource.data($scope.kendo.creditsGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.appInfo.webPaymentLocked = false;\r\n $scope.appInfo.paymentControlOptions = {\r\n format: 'c',\r\n culture: globalizationSvc.getLocale(),\r\n spinners: false\r\n };\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPayments) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n PaymentService.lockPayments($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n $scope.initializePart2();\r\n },\r\n function (err)\r\n {\r\n $scope.appInfo.webPaymentLocked = true;\r\n }\r\n );\r\n };\r\n\r\n $scope.initializePart2 = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.invoiceWarning = false;\r\n\r\n if ($routeParams.paymentKey)\r\n {\r\n $scope.paymentKey = $routeParams.paymentKey.toNumber();\r\n }\r\n\r\n if ($scope.paymentKey < 0 && !angular.isUndefinedOrNullOrEmpty($scope.appInfo.webPayment))\r\n {\r\n //You should only get here by clicking the change button on verify payment\r\n //We reset invoice selection if payment type is select invoices\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType === \"2\") {\r\n var invoicesValueArr = $scope.InvoiceValues();\r\n $scope.selctedInvoicesValue = invoicesValueArr[0];\r\n $scope.selctedInvoicesValueDisplay = invoicesValueArr[1];\r\n }\r\n $scope.setUpView();\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Status !== 0)\r\n {\r\n $scope.goTo(\"/Account/Payments/AccountConfirmPayment\");\r\n }\r\n } else\r\n {\r\n $scope.appInfo.webPayment = {};\r\n $scope.appInfo.webPayment.WebPaymentWithContext = {};\r\n PaymentService.getPayment($scope.appInfo.webUser.CurrentAuthorization.CustKey, $scope.paymentKey).then(function (data)\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext = data;\r\n\r\n if (parseInt($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType, 10) === 2) {\r\n $scope.lockInvoices();\r\n $scope.appInfo.webPayment.WebPaymentWithContext = data;\r\n }\r\n\r\n PaymentService.getScheduledPayments(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey, \"\", \"01/01/1900\", \"01/01/2079\", true, false, false\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.HasPendingPayments = data.CustomerScheduledPayments.any({ Status: 0 });\r\n $scope.appInfo.webPayment.WebPaymentWithContext.HasPendingBudgetPayments = data.CustomerScheduledPayments.any({ Status: 0, PaymentType: 4 }) && !data.CustomerScheduledPayments.any({ Key: $scope.paymentKey, Status: 0, PaymentType: 4 });\r\n });\r\n\r\n $scope.setUpView();\r\n\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Status !== 0)\r\n $scope.goTo(\"/Account/Payments/AccountConfirmPayment\");\r\n });\r\n }\r\n\r\n $scope.selctedInvoicesValue = 0.00;\r\n $scope.selctedCreditsValue = 0.00;\r\n $scope.totalInvoiceAmount = 0.00;\r\n\r\n $scope.getWebProfileMessage(18);\r\n };\r\n\r\n $scope.setPaymentType = function (value)\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = value;\r\n };\r\n\r\n $scope.setUpView = function ()\r\n {\r\n var minDateTime = new Date(\"0001-01-01T00:00:00\".replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n var lastStatementDate = new Date($scope.appInfo.webPayment.WebPaymentWithContext.LastStatementDate.replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n $scope.isStatementCustomer = $scope.appInfo.webPayment.WebPaymentWithContext.IsStatementCustomer;\r\n $scope.isStatementCustomer = lastStatementDate !== minDateTime;\r\n $scope.isStatementCustomer = $scope.isStatementCustomer && $scope.appInfo.webPayment.WebPaymentWithContext.LastStatementAmount > 0;\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Key === 0)\r\n {\r\n // we keep Budget Balance payment type when changing budget web payment\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType !== \"4\") {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = ($scope.isStatementCustomer && $scope.appInfo.webPayment.WebPaymentWithContext.HasUnpaidStatement) ? '1' : '0';\r\n }\r\n }\r\n\r\n $scope.isBudgetCustomer = $scope.appInfo.webPayment.WebPaymentWithContext.IsBudgetCustomer;\r\n $scope.isBBEnabled = $scope.appInfo.webPayment.WebPaymentWithContext.IsBBEnabled;\r\n // we do not want to display negative baudget balance\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.BudgetBalance.toNumber() < 0) {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.BudgetBalance = '0.00';\r\n }\r\n\r\n $scope.isInvoiceCustomer = $scope.appInfo.webPayment.WebPaymentWithContext.IsOpenItemCustomer && $scope.appInfo.webPayment.WebPaymentWithContext.Invoices.length > 0;\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.IsPrepaidCustomer)\r\n {\r\n $scope.isStatementCustomer = false;\r\n $scope.isInvoiceCustomer = false;\r\n }\r\n $scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate = $scope.formatDate($scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate);\r\n $scope.appInfo.webPayment.WebPaymentWithContext.WebMaxEFTDate = $scope.formatDate($scope.appInfo.webPayment.WebPaymentWithContext.WebMaxEFTDate);\r\n\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Key === 0)\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate = $scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate;\r\n }\r\n else\r\n {\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Status < 2)\r\n {\r\n if (new Date($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate) < new Date($scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate))\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate = $scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate;\r\n $scope.notifier.show(localStrings.getLocalizedString(\"PaymentDateNoLongerValid\"), 'warning');\r\n }\r\n }\r\n else\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate = $scope.formatDate($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate);\r\n }\r\n\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount.toNumber() || 0;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n $scope.formatCurrencies();\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType === 4) {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = '4';\r\n }\r\n $scope.viewSetupComplete = true;\r\n };\r\n\r\n $scope.InvoiceValues = function ()\r\n {\r\n var theValue = 0.00;\r\n var theGrossValue = 0.00;\r\n var theDiscount = 0.00;\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.kendo.invoicesGrid.dataSource))\r\n angular.forEach($scope.kendo.invoicesGrid.dataSource.data(), function (charge, index)\r\n {\r\n if (charge.Selected)\r\n {\r\n if (new Date($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate) <= new Date(charge.TermsDiscountDate))\r\n {\r\n theGrossValue = theGrossValue + parseFloat(globalizationSvc.convertStringToNumber(charge.Balance));\r\n theDiscount = theDiscount + charge.TermsDiscount;\r\n theValue = theValue + (Math.round((parseFloat(globalizationSvc.convertStringToNumber(charge.Balance)) - charge.TermsDiscount) * 10000) / 10000);\r\n } else\r\n {\r\n theGrossValue = theGrossValue + parseFloat(globalizationSvc.convertStringToNumber(charge.Balance)); \r\n theDiscount = theDiscount + 0;\r\n theValue = theValue + parseFloat(globalizationSvc.convertStringToNumber(charge.Balance));\r\n }\r\n }\r\n });\r\n\r\n $scope.selctedInvoicesValue = theValue;\r\n $scope.selctedInvoicesGrossValue = theGrossValue;\r\n $scope.selctedInvoicesGrossValueDisplay = globalizationSvc.formatCurrency(theGrossValue);\r\n $scope.selctedInvoicesDiscountValue = theDiscount;\r\n $scope.selctedInvoicesDiscountValueDisplay = globalizationSvc.formatCurrency(theDiscount);\r\n\r\n theValue = 0;\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.kendo.creditsGrid.dataSource))\r\n angular.forEach($scope.kendo.creditsGrid.dataSource.data(), function (credit, index)\r\n {\r\n if (credit.Selected)\r\n {\r\n theValue = theValue + parseFloat(globalizationSvc.convertStringToNumber(credit.UnAppAmount));\r\n }\r\n });\r\n\r\n $scope.selctedCreditsValue = parseFloat(theValue);\r\n $scope.selctedCreditsValueDisplay = globalizationSvc.formatCurrency(theValue);\r\n\r\n $scope.totalInvoiceAmount = Math.round(($scope.selctedInvoicesValue - $scope.selctedCreditsValue) * 10000) / 10000;\r\n if ($scope.totalInvoiceAmount < 0)\r\n {\r\n $scope.totalInvoiceAmount = 0.0;\r\n }\r\n $scope.totalInvoiceAmountDisplay = globalizationSvc.formatCurrency(Math.round(($scope.selctedInvoicesValue - $scope.selctedCreditsValue) * 10000) / 10000);\r\n\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.totalInvoiceAmount;\r\n return [$scope.selctedInvoicesValue, globalizationSvc.formatCurrency($scope.selctedInvoicesValue)];\r\n };\r\n\r\n $scope.getCssClasses = function (ngModelController)\r\n {\r\n return {\r\n error: ngModelController && ngModelController.$invalid && ngModelController.$dirty,\r\n success: ngModelController && ngModelController.$valid && ngModelController.$dirty\r\n };\r\n };\r\n\r\n $scope.showError = function (ngModelController, error)\r\n {\r\n return ngModelController.$error[error];\r\n };\r\n\r\n $scope.setScheduledPaymentAmount = function () {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = globalizationSvc.convertStringToNumber($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay);\r\n };\r\n\r\n $scope.verifyPayment = function ()\r\n {\r\n // pay by invoice\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType === \"2\") {\r\n //set selected invoices\r\n var grid = $scope.kendo.invoicesGrid;\r\n\r\n //set invoices that are selected in grid\r\n grid.dataItems().forEach(function (item) {\r\n var invoice = $scope.appInfo.webPayment.WebPaymentWithContext.Invoices.find({Key: item.Key});\r\n\r\n if (angular.isDefined(invoice)) {\r\n invoice.Selected = item.Selected;\r\n }\r\n\r\n });\r\n\r\n //set selected credits\r\n var gridCr = $scope.kendo.creditsGrid;\r\n\r\n //set invoices that are selected in grid\r\n gridCr.dataItems().forEach(function (item) {\r\n var credit = $scope.appInfo.webPayment.WebPaymentWithContext.Credits.find({Key: item.Key});\r\n\r\n if (angular.isDefined(credit)) {\r\n credit.Selected = item.Selected;\r\n }\r\n\r\n });\r\n }\r\n\r\n //update who made this payment\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CustKey = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Key === 0)\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CreatedByCustContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.LastModifiedByCustContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Status = 0;\r\n //CustPmtAcctKey has been set to a string from the kendo accounts dropdown, so cast it back to a number\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CustPmtAcctKey = $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CustPmtAcctKey.toNumber();\r\n\r\n //handle the selected payment type\r\n switch ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType)\r\n {\r\n case '1':\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.appInfo.webPayment.WebPaymentWithContext.LastStatementAmount;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n break;\r\n\r\n case '2':\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CreditAmount = $scope.selctedCreditsValue;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.GrossAmount = $scope.selctedInvoicesGrossValue;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.totalInvoiceAmount;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.DiscountAmount = $scope.selctedInvoicesDiscountValue;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CreditAmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CreditAmount);\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.GrossAmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.GrossAmount);\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.DiscountAmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.DiscountAmount);\r\n break;\r\n\r\n case '3':\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.appInfo.webPayment.WebPaymentWithContext.AccountBalance;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n break;\r\n\r\n case '4':\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.appInfo.webPayment.WebPaymentWithContext.BudgetBalance;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n break;\r\n\r\n default:\r\n var amount = $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount.toNumber() || 0;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = amount;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n break;\r\n }\r\n\r\n //ensure that payment amount is greater than 0\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n //passed all tests; continue with process\r\n $scope.$cancelPromptToSave();\r\n $scope.goTo(\"/Account/Payments/AccountVerifyPayment\");\r\n };\r\n\r\n $scope.paymentIsValid = function ()\r\n {//Return true if there are errors.\r\n\r\n var elem = $('#paymentSelection');\r\n elem.css(\"border\", \"\");\r\n\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount &&\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount !== '')\r\n {\r\n var theValue = $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount.toString().replace(/$/g, \"\");\r\n theValue = parseFloat(theValue);\r\n if (theValue > 0)\r\n return false;\r\n }\r\n\r\n elem.css('border', '1px solid red');\r\n\r\n return true;\r\n };\r\n\r\n var paymentDateValidation =\r\n {\r\n _localStrings: localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\"),\r\n name: 'validateLiftDate',\r\n validationMessage: '',\r\n validationMessageWrn: '',\r\n validatorError: function (liftDateTime, parms)\r\n {\r\n var isValid = true;\r\n var minDate = new Date($scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate);\r\n var maxDate = new Date($scope.appInfo.webPayment.WebPaymentWithContext.WebMaxEFTDate);\r\n var liftDate = new Date(liftDateTime);\r\n\r\n if (Date.create(liftDateTime).format('{MM}/{dd}/{yyyy}') === \"Invalid Date\" || (liftDate < minDate) || (liftDate > maxDate)) {\r\n /*this.validationMessage = \"Please select or enter a payment date between \" +\r\n minDate.format('{MM}/{dd}/{yyyy}') + \" and \" +\r\n maxDate.format('{MM}/{dd}/{yyyy}') + \".\";*/\r\n\r\n var replacementParms = [ minDate.format('{MM}/{dd}/{yyyy}'), maxDate.format('{MM}/{dd}/{yyyy}')];\r\n\r\n this.validationMessage = paymentDateValidation._localStrings.getLocalizedString(\"PaymentDateValidationMsg\", replacementParms);\r\n\r\n return false;\r\n }\r\n\r\n return isValid;\r\n },\r\n validatorWarning: function (liftDateTime, parms)\r\n {\r\n var hasWarning = false;\r\n return !hasWarning;\r\n }\r\n };\r\n\r\n $scope.validatePaymentDate = new pdi.ng.validate.PdiValidation(paymentDateValidation);\r\n\r\n $scope.lockInvoices = function ()\r\n {\r\n PaymentService.lockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = '2';\r\n $scope.invoicesLocked = true;\r\n $scope.kendo.invoicesGridInit.delay(10, $scope.appInfo.webPayment.WebPaymentWithContext.Invoices);\r\n $scope.kendo.creditsGridInit.delay(10, $scope.appInfo.webPayment.WebPaymentWithContext.Credits);\r\n },\r\n function (err)\r\n {\r\n $scope.invoicesLocked = false;\r\n $scope.invoiceWarning = true;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = '0';\r\n }\r\n );\r\n };\r\n\r\n $scope.unlockInvoices = function (paymentType)\r\n {\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType !== '2')\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = paymentType;\r\n }\r\n PaymentService.unockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n $scope.invoicesLocked = false;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = paymentType;\r\n };\r\n\r\n $scope.checkAll = function (grid, id)\r\n {\r\n var checked = document.getElementById(id).checked || false;\r\n grid.dataItems().forEach(function (item)\r\n {\r\n item.Selected = checked;\r\n });\r\n };\r\n\r\n $scope.formatCurrencies = function () { \r\n var paymentsInfo = $scope.appInfo.webPayment.WebPaymentWithContext;\r\n\r\n var lastStmtAmt = paymentsInfo.LastStatementAmount;\r\n var acctBalance = paymentsInfo.AccountBalance;\r\n var budgetBalance = paymentsInfo.BudgetBalance;\r\n\r\n paymentsInfo.LastStatementAmountDisplay = globalizationSvc.formatCurrency(lastStmtAmt);\r\n paymentsInfo.AccountBalanceDisplay = globalizationSvc.formatCurrency(acctBalance);\r\n paymentsInfo.BudgetAmountDisplay = globalizationSvc.formatCurrency(budgetBalance);\r\n };\r\n })\r\n .controller(\"VerifyPaymentCtrl\", function ($scope, $http, $q, PaymentService, WebFunctions, templates, globalizationSvc)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPayments) || !$scope.paymentsEnabled())\r\n $scope.goTo(\"/Home\"); \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n $scope.getWebProfileMessage(18);\r\n $scope.isBudgetPayment = $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType === \"4\";\r\n $scope.isBudgetCustomer = $scope.appInfo.webPayment.WebPaymentWithContext.IsBudgetCustomer;\r\n $scope.isBBEnabled = $scope.appInfo.webPayment.WebPaymentWithContext.IsBBEnabled;\r\n $scope.budgetBalanceChanged = false;\r\n };\r\n $scope.confirmPayment = function () {\r\n //validate budget billing state if budget payment\r\n if ($scope.isBudgetPayment) {\r\n PaymentService.getBudgetPaymentContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data) {\r\n $scope.isBudgetCustomer = data.IsBudgetCustomer;\r\n $scope.isBBEnabled = data.IsBBEnabled;\r\n $scope.budgetBalanceChanged = $scope.appInfo.webPayment.WebPaymentWithContext.BudgetBalance !== data.BudgetBalance;\r\n if ($scope.isBBEnabled && $scope.isBudgetCustomer && !$scope.budgetBalanceChanged) {\r\n $scope.savePayment();\r\n }\r\n }\r\n );\r\n } else {\r\n $scope.savePayment();\r\n }\r\n };\r\n $scope.savePayment = function () {\r\n //create variable of webpayment data\r\n var webPayment = $scope.appInfo.webPayment;\r\n\r\n //for each invoice, convert the string balance to a number so it properly gets sent to controller\r\n webPayment.WebPaymentWithContext.Invoices.forEach(function (item) {\r\n item.Balance = (globalizationSvc.convertStringToNumber(item.Balance)); \r\n });\r\n\r\n //for each credit, convert unappAmmount and amount to numbers\r\n webPayment.WebPaymentWithContext.Credits.forEach(function (item) {\r\n item.Amount = (globalizationSvc.convertStringToNumber(item.Amount));\r\n item.UnAppAmount = (globalizationSvc.convertStringToNumber(item.UnAppAmount));\r\n });\r\n\r\n PaymentService.savePayment(webPayment.WebPaymentWithContext).then(\r\n function (data) {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment = data.CustomerScheduledPayment;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.Invoices = data.Invoices;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.Credits = data.Credits;\r\n $scope.goTo(\"/Account/Payments/AccountConfirmPayment\");\r\n PaymentService.unLockPayments($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n PaymentService.unockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n }\r\n );\r\n };\r\n $scope.changePayment = function ()\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.Invoices.forEach(function (item) {\r\n item.Selected = false;\r\n });\r\n\r\n $scope.appInfo.webPayment.WebPaymentWithContext.Credits.forEach(function (item) {\r\n item.Selected = false;\r\n });\r\n\r\n PaymentService.unLockPayments($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n PaymentService.unockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n\r\n PaymentService.getBudgetPaymentContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data) {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.IsBudgetCustomer = data.IsBudgetCustomer;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.IsBBEnabled = data.IsBBEnabled;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.BudgetBalance = data.BudgetBalance;\r\n }\r\n );\r\n $scope.goTo(\"/Account/Payments/MakeAPayment/-1\");\r\n };\r\n })\r\n .controller(\"ConfirmPaymentCtrl\", function ($scope, $http, $q, PaymentService, WebFunctions, templates, globalizationSvc)\r\n {\r\n 'use strict';\r\n //Once you come bace from saving the payment type will be an integer not a string so drop the quotes.\r\n\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPayments) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType === '2')\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CreditAmount = $scope.reCalculateCreditValues();\r\n $scope.getWebProfileMessage(21);\r\n };\r\n $scope.reCalculateCreditValues = function ()\r\n {\r\n var theValue = 0;\r\n angular.forEach($scope.appInfo.webPayment.WebPaymentWithContext.Credits, function (credit, index)\r\n {\r\n if (credit.Selected)\r\n theValue = parseFloat(theValue) + parseFloat(credit.UnAppAmount);\r\n });\r\n return theValue;\r\n };\r\n\r\n })\r\n .controller(\"ScheduledPaymentHistorySideMenuCtrl\", function ($scope, $http, $q, PaymentService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.paymentHistory = {\r\n scheduled: 'true',\r\n processed: 'false',\r\n canceled: 'false'\r\n };\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.selection = 13;\r\n PaymentService.getScheduledPaymentHistoryContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.locationInfo.sideMenuData.paymentHistory = {\r\n scheduled: true,\r\n processed: false,\r\n canceled: false,\r\n accounts: data.CustomerPaymentAccounts\r\n };\r\n });\r\n };\r\n })\r\n .controller(\"ScheduledPaymentHistoryCtrl\", function ($scope, $http, $q, PaymentService, WebFunctions, $filter, templates, validatorSvc, localStrings, globalizationSvc)\r\n {\r\n 'use strict';\r\n\r\n $scope.scheduledPayments = [];\r\n $scope.kendo = {};\r\n $scope.kendo.pmntGrid = {};\r\n $scope.kendo.pmntGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n title: localStrings.getLocalizedString(\"Account\"),\r\n field: \"CustPmtAcctDescription\",\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Amount\",\r\n title: localStrings.getLocalizedString(\"Amount\"),\r\n width: 100,\r\n format: \"{0:c}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"FormattedDate\",\r\n title: localStrings.getLocalizedString(\"PaymentDate\"),\r\n width: 100,\r\n format: \"{0:MM/dd/yyyy}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"StatusDescription\",\r\n title: localStrings.getLocalizedString(\"Status\"),\r\n width: 75,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"FormattedActivityDate\",\r\n title: localStrings.getLocalizedString(\"LastActivity\"),\r\n width: 100,\r\n format: \"{0:MM/dd/yyyy}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Key\",\r\n title: localStrings.getLocalizedString(\"Confirmation\"),\r\n width: 90,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Created\",\r\n title: localStrings.getLocalizedString(\"Entered\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {mode: \"row\", extra: false},\r\n //height: $(document).height() - 375,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.pmntGridInit = function ()\r\n {\r\n $scope.scheduledPayments.each(function (payment) {\r\n payment.Amount = globalizationSvc.formatNumeric(payment.Amount);\r\n });\r\n \r\n $scope.kendo.pmntGridDS = new kendo.data.DataSource({\r\n data: $scope.scheduledPayments,\r\n schema: {\r\n model: {\r\n fields: {\r\n CustPmtAcctDescription: {\r\n editable: false\r\n },\r\n Amount: {\r\n editable: false\r\n },\r\n FormattedDate: {\r\n editable: false\r\n },\r\n StatusDescription: {\r\n editable: false\r\n },\r\n FormattedActivityDate: {\r\n editable: false\r\n },\r\n Key: {\r\n editable: false\r\n },\r\n Created: {\r\n editable: false\r\n }\r\n }\r\n }\r\n },\r\n batch: true\r\n });\r\n\r\n $scope.kendo.pmntGridDS.read();\r\n $scope.kendo.pmntGrid.dataSource.data($scope.kendo.pmntGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPayments))\r\n {\r\n $scope.goTo(\"/Account/Payments/ViewPaymentAccounts\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\"); //'account/payments/paymentSideMenu.tpl.html';\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"4\";\r\n $scope.getWebProfileMessage(19);\r\n $scope.scheduledPayments = [];\r\n $scope.predicate = 'FormattedDate';\r\n $scope.reverse = true;\r\n $scope.cancelPaymentKey = -1;\r\n $scope.cancelConfirm = false;\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n if (!($scope.locationInfo.sideMenuData.paymentHistory.scheduled ||\r\n $scope.locationInfo.sideMenuData.paymentHistory.processed ||\r\n $scope.locationInfo.sideMenuData.paymentHistory.canceled))\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"AtLeastOneOption\"), 'error');\r\n return;\r\n }\r\n\r\n PaymentService.getScheduledPayments($scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.locationInfo.sideMenuData.paymentHistory.selectedAccount,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate,\r\n $scope.locationInfo.sideMenuData.paymentHistory.scheduled,\r\n $scope.locationInfo.sideMenuData.paymentHistory.processed,\r\n $scope.locationInfo.sideMenuData.paymentHistory.canceled).then(function (data)\r\n {\r\n if (data.CustomerScheduledPayments.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"ScheduledPaymentsHist\"));\r\n }\r\n $scope.scheduledPayments = data.CustomerScheduledPayments;\r\n angular.forEach($scope.scheduledPayments, function (element)\r\n {\r\n element.Amount = globalizationSvc.formatCurrency(element.Amount);\r\n element.FormattedDate = $filter('date')(element.PaymentDate, 'MM/dd/yyyy');\r\n element.FormattedActivityDate = $filter('date')(element.LastModifiedDateTime, 'MM/dd/yyyy');\r\n element.FormattedCreatedDate = $filter('date')(element.CreatedDateTime, 'MM/dd/yyyy');\r\n element.Created = element.FormattedCreatedDate + ' ' + localStrings.getLocalizedString(\"By\") + ' ' + element.CreatedByCustContEmailAddress;\r\n });\r\n\r\n $scope.kendo.pmntGridInit();\r\n });\r\n };\r\n\r\n $scope.confirmCancelPayment = function (paymentKey)\r\n {\r\n $scope.cancelPaymentKey = paymentKey;\r\n $scope.cancelConfirm = true;\r\n };\r\n\r\n $scope.cancelPayment = function (paymentKey)\r\n {\r\n PaymentService.getPayment($scope.appInfo.webUser.CurrentAuthorization.CustKey, paymentKey).then(function (data)\r\n {\r\n var WebPaymentWithContext = data;\r\n WebPaymentWithContext.CustomerScheduledPayment.Status = 1;\r\n WebPaymentWithContext.CustomerScheduledPayment.LastModifiedByCustContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n PaymentService.savePayment(WebPaymentWithContext).then(function (data)\r\n {\r\n $scope.$parent.applyAction();\r\n });\r\n });\r\n $scope.cancelConfirm = false;\r\n };\r\n })\r\n .controller(\"paymentSideMenuCtrl\", function ($scope, WebFunctionGroups, PaymentService, $rootScope, $interval)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermissions(WebFunctionGroups.Payments))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n /*\r\n Use $interval to periodically refresh the locks.\r\n When the user navigates away from the page the $destroy listener is triggered to kill off the $interval.\r\n Likewise, the $interval is stopped when the payment/invoices are unlocked.\r\n This is paired with a query in CustomerRepository in EntWeb that wipes out Petronet Locks if they are > 20 minutes old.\r\n */\r\n\r\n var intervalPromise;\r\n var lockData;\r\n var invoicesLocked;\r\n var intervalTime = 120000;//Every 2 mins\r\n\r\n function refreshLock() {\r\n if (!angular.isUndefinedOrNullOrEmpty(lockData)) {\r\n if (!invoicesLocked) {\r\n console.log(\"Payments lock refreshed\");\r\n PaymentService.lockPayments(lockData.CustContKey, lockData.EmailAddress, lockData.CustomerKey, true);\r\n } else {\r\n console.log(\"Payments and Invoices lock refreshed\");\r\n PaymentService.lockPaymentsAndInvoices(lockData.CustContKey, lockData.EmailAddress, lockData.CustomerKey);\r\n }\r\n }\r\n }\r\n\r\n function resetValues() {\r\n invoicesLocked = false;\r\n lockData = null;\r\n }\r\n\r\n $scope.startLockInterval = function (data) {\r\n $scope.stopLockInterval();\r\n intervalPromise = $interval(refreshLock, intervalTime);\r\n };\r\n\r\n $scope.stopLockInterval = function () {\r\n $interval.cancel(intervalPromise);\r\n };\r\n\r\n //Start periodic refresh on lock\r\n var paymentLockListener = $rootScope.$on('event:PaymentLocked', function (event, data) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data)) {\r\n lockData = data;\r\n $scope.startLockInterval();\r\n }\r\n });\r\n\r\n var invoiceLockListener = $rootScope.$on('event:InvoiceLocked', function (event, data) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data)) {\r\n lockData = data;\r\n invoicesLocked = true;\r\n }\r\n });\r\n\r\n //Stop the interval when unlocked\r\n var paymentUnlockListener = $rootScope.$on('event:PaymentUnlocked', function () {\r\n $scope.stopLockInterval();\r\n resetValues();\r\n });\r\n\r\n var invoiceUnlockListener = $rootScope.$on('event:InvoiceUnlocked', function () {\r\n invoicesLocked = false;\r\n });\r\n\r\n //Destroy the listeners and intervals when we navigate away from this page \r\n $scope.$on('$destroy', function () {\r\n $scope.stopLockInterval();\r\n paymentUnlockListener();\r\n invoiceUnlockListener();\r\n paymentLockListener();\r\n invoiceLockListener();\r\n resetValues();\r\n });\r\n\r\n })\r\n .controller(\"PaymentAccountsCtrl\", function ($scope, $http, $q, $rootScope, $route, PaymentAccountService, WebFunctions, $filter, templates, localStrings, globalizationSvc)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.acctGrid = {};\r\n $scope.kendo.acctGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n title: localStrings.getLocalizedString(\"AccountName\"),\r\n field: \"Description\",\r\n attributes: {class: \"alignLeft\"},\r\n template: \"\",\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Status\"),\r\n field: \"AccountStatusDesc\",\r\n attributes: {class: \"alignLeft\"},\r\n width: 150,\r\n template: \"{{dataItem.AccountStatusDesc}} {{dataItem.AccountStatusDesc}}\",\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"LastPayment\"),\r\n field: \"FormattedActivityDate\",\r\n width: 150,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"NextScheduledPayment\"),\r\n field: \"NextPaymentText\",\r\n width: 200,\r\n attributes: {class: \"alignLeft\"},\r\n template: \"{{dataItem.NextPaymentText}}\",\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \" \",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {mode: \"row\", extra: false},\r\n //height: $(document).height() - 375,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.acctGridInit = function ()\r\n {\r\n $scope.kendo.acctGridDS = new kendo.data.DataSource({\r\n data: $scope.WebPaymentAccounts,\r\n schema: {\r\n model: {\r\n fields: {\r\n Description: {\r\n editable: false\r\n },\r\n AccountStatusDesc: {\r\n editable: false\r\n },\r\n FormattedActivityDate: {\r\n editable: false\r\n },\r\n NextPaymentText: {\r\n editable: false\r\n }\r\n }\r\n }\r\n },\r\n batch: true\r\n });\r\n\r\n $scope.kendo.acctGridDS.read();\r\n $scope.kendo.acctGrid.dataSource.data($scope.kendo.acctGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n $scope.predicate = 'SortOrder';\r\n $scope.reverse = false;\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n $scope.getWebProfileMessage(12);\r\n $scope.refresh();\r\n };\r\n\r\n $scope.refresh = function ()\r\n {\r\n PaymentAccountService.getPaymentAccountList($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.WebPaymentAccounts = data;\r\n angular.forEach($scope.WebPaymentAccounts, function (element)\r\n {\r\n element.FormattedActivityDate = element.AccountLastActivity === '0001-01-01T00:00:00' ? null : $filter('date')(element.AccountLastActivity, 'MM/dd/yyyy');\r\n element.FormattedPaymentDate = element.AccountNextPayment === '0001-01-01T00:00:00' ? null : $filter('date')(element.AccountNextPayment, 'MM/dd/yyyy');\r\n element.NextPaymentText = element.FormattedPaymentDate === null ? null : element.FormattedPaymentDate + ' ' + localStrings.getLocalizedString(\"For\") + ' ' + globalizationSvc.formatCurrency(element.AccountNextPaymentAmmount);\r\n });\r\n $scope.kendo.acctGridInit();\r\n });\r\n };\r\n })\r\n .controller(\"EditAccountCtrl\", function ($scope, $http, $q, $routeParams, $filter, PaymentAccountService, validatorSvc, WebFunctions, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.editableAccount = false;\r\n $scope.paymentAccountKey = 0; \r\n $scope.customText = \"\";\r\n $scope.initializeEditAcount = function ()\r\n {\r\n $scope.AccountTypes =\r\n [\r\n { key: 0, descr: localStrings.getLocalizedString(\"Checking\") },\r\n { key: 1, descr: localStrings.getLocalizedString(\"Savings\") }\r\n ];\r\n\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"7\";\r\n\r\n if ($routeParams.paymentAccountKey)\r\n {\r\n $scope.paymentAccountKey = $routeParams.paymentAccountKey;\r\n }\r\n\r\n if ($scope.paymentAccountKey < 0)\r\n {//Edit from verify page\r\n $scope.WebPaymentAccount = PaymentAccountService.WebPaymentAccount;\r\n $scope.editableAccount = $scope.WebPaymentAccount.AccountStatus <= 1 || $scope.WebPaymentAccount.AccountStatus === 5;\r\n } else if ($scope.paymentAccountKey > 0)\r\n {//Existing\r\n PaymentAccountService.getPaymentAccount($scope.paymentAccountKey, $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.WebPaymentAccount = data;\r\n $scope.WebPaymentAccount.AccountTypeDescr = $scope.AccountTypes[$scope.WebPaymentAccount.AccountType].descr;\r\n $scope.WebPaymentAccount.LastModifiedByCustContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n $scope.editableAccount = $scope.WebPaymentAccount.AccountStatus <= 1 || $scope.WebPaymentAccount.AccountStatus === 5;\r\n });\r\n } else if ($scope.paymentAccountKey === 0)\r\n {//New\r\n $scope.WebPaymentAccount = new CustomerPaymentAccount(\r\n {\r\n CustKey: $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n CreatedByCustContKey: $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n LastModifiedByCustContKey: $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n AccountStatus: 0,\r\n AccountStatusDesc: localStrings.getLocalizedString(\"New\"),\r\n Key: 0\r\n }\r\n );\r\n $scope.editableAccount = true;\r\n }\r\n };\r\n\r\n $scope.routingNumberIsValid = false;\r\n\r\n $scope.setAccountStatus = function (status)\r\n {\r\n if (status !== 0 && status !== 8)\r\n return;\r\n PaymentAccountService.getPaymentAccount($scope.WebPaymentAccount.Key, $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.WebPaymentAccount = data;\r\n $scope.WebPaymentAccount.AccountStatus = status;\r\n PaymentAccountService.savePaymentAccount($scope.WebPaymentAccount).then(\r\n function (data)\r\n {\r\n $scope.WebPaymentAccount = data;//refresh once you save to update timestamps\r\n $scope.goTo('Account/Payments/ViewPaymentAccounts');\r\n },\r\n function (data)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddAccount\"), localStrings.getLocalizedString(\"ErrorSavingAccount\") + data);\r\n }\r\n );\r\n });\r\n };\r\n\r\n $scope.verifyPaymentAccount = function ()\r\n {\r\n if ($scope.editableAccount)\r\n {\r\n $scope.WebPaymentAccount.AccountTypeDescr = $scope.AccountTypes[$scope.WebPaymentAccount.AccountType].descr;\r\n PaymentAccountService.validateRoutingNumber($scope.WebPaymentAccount.BankRoutingNo).then(\r\n function (data)\r\n {\r\n $scope.routingNumberIsValid = true;\r\n $scope.verifyPaymentAccountOverride();\r\n },\r\n function (error)\r\n {\r\n $scope.routingNumberIsValid = false;\r\n $scope.verifyPaymentAccountOverride();\r\n });\r\n } else\r\n {\r\n $scope.verifyPaymentAccountOverride();\r\n }\r\n };\r\n\r\n $scope.verifyPaymentAccountOverride = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n PaymentAccountService.WebPaymentAccount = $scope.WebPaymentAccount;\r\n $scope.$cancelPromptToSave();\r\n $scope.goTo(\"/Account/Payments/VerifyPaymentAccount\");\r\n };\r\n\r\n var routingNumberValidation =\r\n {\r\n name: 'validateRoutingNumber',\r\n validationMessage: localStrings.getLocalizedString(\"InvalidRoutingNumber\"),\r\n validatorError: function (val)\r\n {\r\n return $scope.routingNumberIsValid;\r\n }\r\n };\r\n\r\n $scope.validateRoutingNumber = new pdi.ng.validate.PdiValidation(routingNumberValidation);\r\n\r\n $scope.confirmDeactivate = function ()\r\n {\r\n var yes = function ()\r\n {\r\n $scope.setAccountStatus(8);\r\n };\r\n\r\n var no = function ()\r\n {\r\n return;\r\n };\r\n\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"DeactivateAccount\"), yes, no);\r\n };\r\n\r\n $scope.confirmClose = function ()\r\n {\r\n var no = function ()\r\n {\r\n $scope.goTo('Account/Payments/ViewPaymentAccounts');\r\n };\r\n\r\n if ($scope.acctInfo.$dirty)\r\n {\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"UnsavedChanges\"), $scope.verifyPaymentAccount, no);\r\n }\r\n else\r\n no();\r\n };\r\n })\r\n .controller(\"VerifyAccountCtrl\", function ($scope, $http, $q, $routeParams, $filter, PaymentAccountService, validatorSvc, WebFunctions, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.customText = \"\";\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"8\";\r\n\r\n $scope.WebPaymentAccount = PaymentAccountService.WebPaymentAccount;\r\n };\r\n\r\n $scope.routingNumberIsValid = false;\r\n\r\n $scope.confirmPaymentAccount = function ()\r\n {\r\n PaymentAccountService.savePaymentAccount($scope.WebPaymentAccount).then(\r\n function (data)\r\n {\r\n $scope.goTo(\"/Account/Payments/ConfirmPaymentAccount/\" + data.Key);\r\n },\r\n function (data)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddAccount\"), localStrings.getLocalizedString(\"ErrorSavingAccount\") + data);\r\n }\r\n );\r\n };\r\n\r\n $scope.changePaymentAccount = function ()\r\n {\r\n $scope.goTo(\"/Account/Payments/EditPaymentAccount/-1\");\r\n };\r\n })\r\n .controller(\"ConfirmAccountCtrl\", function ($scope, $http, $q, $routeParams, $filter, PaymentAccountService, WebFunctions, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.AccountTypes =\r\n [\r\n { key: 0, descr: localStrings.getLocalizedString(\"Checking\") },\r\n { key: 1, descr: localStrings.getLocalizedString(\"Savings\") }\r\n ];\r\n $scope.paymentAccountKey = 0;\r\n $scope.customText = \"\";\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"9\";\r\n\r\n if ($routeParams.paymentAccountKey)\r\n {\r\n $scope.paymentAccountKey = $routeParams.paymentAccountKey;\r\n }\r\n\r\n if ($routeParams.paymentAccountKey <= 0)\r\n {\r\n $scope.goTo(\"/Home\");\r\n } else if ($routeParams.paymentAccountKey > 0)\r\n {\r\n PaymentAccountService.getPaymentAccount($scope.paymentAccountKey, $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.WebPaymentAccount = data;\r\n $scope.WebPaymentAccount.AccountTypeDescr = $scope.AccountTypes[$scope.WebPaymentAccount.AccountType].descr;\r\n $scope.WebPaymentAccount.AccountNoVerify = $scope.WebPaymentAccount.AccountNo;\r\n });\r\n }\r\n };\r\n })\r\n .controller(\"AccountVerificationCtrl\", function ($scope, PaymentAccountService, $filter, validatorSvc, WebFunctions, $routeParams, templates)\r\n {\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n $scope.goTo(\"/Home\");\r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n\r\n $scope.appInfo.verifyAccount = {};\r\n validatorSvc.clearValidationScopes();\r\n if ($routeParams.paymentAccountKey)\r\n $scope.appInfo.verifyAccount.webPaymentAccountKey = $routeParams.paymentAccountKey;\r\n else\r\n $scope.goTo(\"/Account/Payments/ViewPaymentAccounts\");\r\n\r\n $scope.appInfo.verifyAccount = {};\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n\r\n PaymentAccountService.getPaymentAccountList($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.appInfo.verifyAccount.webPaymentAccountDesc = $filter(\"filter\")(data, {Key: $scope.appInfo.verifyAccount.webPaymentAccountKey})[0].Description;\r\n $scope.appInfo.verifyAccount.WebPaymentAccounts = $filter(\"filter\")(data, {AccountStatus: 4});\r\n });\r\n $scope.getWebProfileMessage(15);\r\n };\r\n\r\n $scope.verifyPaymentAccount = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n $scope.goTo(\"/Account/Payments/PaymentAccountVerificationVerify/\" + $routeParams.paymentAccountKey);\r\n };\r\n })\r\n .controller(\"AccountVerificationVerificationCtrl\", function ($scope, PaymentAccountService, $filter, validatorSvc, WebFunctions, $routeParams, templates)\r\n {\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n $scope.goTo(\"/Home\");\r\n\r\n if ($routeParams.paymentAccountKey)\r\n $scope.appInfo.verifyAccount.webPaymentAccountKey = $routeParams.paymentAccountKey;\r\n else\r\n $scope.goTo(\"/Account/Payments/ViewPaymentAccounts\");\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n\r\n $scope.getWebProfileMessage(15);\r\n };\r\n\r\n $scope.confirmPaymentAccount = function ()\r\n {\r\n PaymentAccountService.getPaymentAccount($scope.appInfo.verifyAccount.webPaymentAccountKey, $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n var amt1 = parseFloat($scope.appInfo.verifyAccount.amount1);\r\n var amt2 = parseFloat($scope.appInfo.verifyAccount.amount2);\r\n if ((data.VerificationAmount1 !== amt1 && data.VerificationAmount1 !== amt2) ||\r\n (data.VerificationAmount2 !== amt1 && data.VerificationAmount2 !== amt2))\r\n {\r\n data.AccountStatus = 6;\r\n PaymentAccountService.savePaymentAccount(data);\r\n $scope.goTo(\"/Account/Payments/PaymentAccountVerificationFailure/\");\r\n return;\r\n }\r\n data.AccountStatus = 7;\r\n PaymentAccountService.savePaymentAccount(data);\r\n $scope.goTo(\"/Account/Payments/PaymentAccountVerificationConfirmation/\" + $routeParams.paymentAccountKey);\r\n });\r\n };\r\n\r\n $scope.verifyPaymentAccount = function ()\r\n {\r\n $scope.goTo(\"/Account/Payments/PaymentAccountVerification/\" + $routeParams.paymentAccountKey);\r\n };\r\n\r\n })\r\n .controller(\"AccountVerificationConfirmationCtrl\", function ($scope, PaymentAccountService, $filter, validatorSvc, WebFunctions, $routeParams, templates)\r\n {\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n $scope.goTo(\"/Home\");\r\n\r\n if (!$routeParams.paymentAccountKey)\r\n $scope.goTo(\"/Account/Payments/ViewPaymentAccounts\");\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n\r\n PaymentAccountService.getPaymentAccountList($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.appInfo.verifyAccount.WebPaymentAccounts = $filter(\"filter\")(data, {AccountStatus: 4});\r\n });\r\n $scope.getWebProfileMessage(16);\r\n };\r\n })\r\n .controller(\"AccountVerificationFailCtrl\", function ($scope, PaymentAccountService, $filter, validatorSvc, WebFunctions, $routeParams, templates)\r\n {\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts))\r\n $scope.goTo(\"/Home\");\r\n\r\n $scope.appInfo.verifyAccount = {};\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n\r\n PaymentAccountService.getPaymentAccountList($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.appInfo.verifyAccount.WebPaymentAccounts = $filter(\"filter\")(data, {AccountStatus: 4});\r\n });\r\n $scope.getWebProfileMessage(17);\r\n };\r\n });","/**\r\n * Created by rhampton on 8/13/2014.\r\n */\r\nangular.module(\"pnAdmin\", ['ngSanitize', 'core.objects', 'services.payments', 'core.directives', 'core.enums','core.security'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider.when(\"/Account/Profile/YourProfile\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"YourProfile\"),\r\n controller: \"EditUserCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/YourProfile/:contactKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"YourProfile\"),\r\n controller: \"EditUserCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/Contacts\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Contacts\"),\r\n controller: \"ListContactsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/AddContact\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AddContact\"),\r\n controller: \"AddUserCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/AccountSettings\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AccountSettings\"),\r\n controller: \"AccountSettingsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/ResetPassword\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ProfileResetPassword\"),\r\n controller: \"SetPasswordCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/AuditLog\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AuditLog\"),\r\n controller: \"auditLogCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n );\r\n })//AccountSettings\r\n .controller(\"ProfileSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n\r\n };\r\n\r\n })\r\n .controller(\"ListContactsCtrl\", function ($scope, userAccountService, WebFunctions, $filter, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.contactsGrid = {};\r\n $scope.kendo.contactsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var selectedRows = this.select();\r\n var dataItem = this.dataItem(selectedRows[0]);\r\n $scope.goTo(\"/Account/Profile/YourProfile/\" + dataItem.Key);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"DisplayName\",\r\n title: localStrings.getLocalizedString(\"Contact\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"EmailAddress\",\r\n title: localStrings.getLocalizedString(\"Email\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"WebActive\",\r\n title: localStrings.getLocalizedString(\"Active\"),\r\n width: 50,\r\n template: \"\",\r\n filterable: false\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n //height: $(document).height() - 375,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.contactsGridInit = function ()\r\n {\r\n $scope.kendo.contactsGridDS = new kendo.data.DataSource({\r\n data: $scope.CustomerContacts,\r\n schema: {\r\n model: {\r\n fields: {\r\n DisplayName: {\r\n editable: false\r\n },\r\n EmailAddress: {\r\n editable: false\r\n },\r\n WebActive: {\r\n editable: false\r\n }\r\n }\r\n }\r\n },\r\n batch: true\r\n });\r\n\r\n $scope.kendo.contactsGridDS.read();\r\n $scope.kendo.contactsGrid.dataSource.data($scope.kendo.contactsGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.ManageContactsAndSecurity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n $scope.CustomerContacts = [];\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.CustomerContacts.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"Contacts\"));\r\n return;\r\n }\r\n\r\n angular.forEach(data.CustomerContacts, function (item)\r\n {\r\n item.DisplayName = item.FirstName + ' ' + item.LastName;\r\n });\r\n $scope.CustomerContacts = $filter('orderBy')(data.CustomerContacts, 'DisplayName');\r\n $scope.kendo.contactsGridInit();\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n };\r\n })\r\n .controller(\"EditUserCtrl\", function ($q, $scope, $filter, WebFunctions, userAccountService, constantLists, $route, $routeParams, WebUserSvc, validatorSvc, $location, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.data = {};\r\n $scope.kendo = {};\r\n\r\n function expandWFGrids(expand)\r\n {\r\n $scope.showAccountFNs = expand;\r\n $scope.showFuelFNs = expand;\r\n $scope.showOrdersFNs = expand;\r\n $scope.showPaperworkFNs = expand;\r\n $scope.showCustomPagesFNs = expand;\r\n }\r\n\r\n function setDependancies()\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.data.CustomerContact) || $scope.data.CustomerContact.AllWebFunctions)\r\n return;\r\n\r\n var wbfns = $scope.data.CustomerContact.CustomerContactWebFunctions;\r\n\r\n angular.forEach(wbfns, function (item)\r\n {\r\n switch (item.WebFnKey)\r\n {\r\n case 5:\r\n //View Cards => Edit cards\r\n var view = $filter('filter')(wbfns, {WebFnKey: 4}, true)[0];\r\n if (view.Selected)\r\n {\r\n item.Disabled = false;\r\n }\r\n else\r\n {\r\n item.Selected = false;\r\n item.Disabled = true;\r\n }\r\n break;\r\n\r\n case 6:\r\n //View Card Transactions => View Card Transactions Alerts\r\n var trans = $filter('filter')(wbfns, {WebFnKey: 3}, true)[0];\r\n if (trans.Selected)\r\n {\r\n item.Disabled = false;\r\n }\r\n else\r\n {\r\n item.Selected = false;\r\n item.Disabled = true;\r\n }\r\n break;\r\n\r\n case 15:\r\n //Acount Activity => View Credit Info\r\n var acct = $filter('filter')(wbfns, {WebFnKey: 1}, true)[0];\r\n if (acct.Selected)\r\n {\r\n item.Disabled = false;\r\n }\r\n else\r\n {\r\n item.Selected = false;\r\n item.Disabled = true;\r\n }\r\n break;\r\n }\r\n });\r\n }\r\n\r\n $scope.$watch(\"data.CustomerContact.CustomerContactWebFunctions\", setDependancies, true);\r\n\r\n $scope.textMessagePhoneNumbers = [\r\n {\r\n value: -1,\r\n text: localStrings.getLocalizedString(\"None\")\r\n },\r\n {\r\n value: 0,\r\n text: localStrings.getLocalizedString(\"Phone\")\r\n },\r\n {\r\n value: 1,\r\n text: localStrings.getLocalizedString(\"AltPhone\")\r\n },\r\n {\r\n value: 2,\r\n text: localStrings.getLocalizedString(\"AltPhone2\")\r\n }\r\n ];\r\n\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.checkForAppliedProfile();\r\n\r\n if (!$scope.appInfo) $scope.appInfo = {};\r\n\r\n $scope.appInfo.editUser = {\r\n modalMultiSave: {\r\n shown: false\r\n },\r\n modalCopySecurity: {\r\n shown: false,\r\n copyContact: {},\r\n clearSecurity: false\r\n },\r\n modalResetPassword: {\r\n shown: false,\r\n controls: {\r\n password: '',\r\n verify: '',\r\n displayTitle: localStrings.getLocalizedString(\"EnterVerifyPassword\")\r\n },\r\n webUser: {\r\n Timestamp: '',\r\n Answer: '',\r\n AnswerClear: '',\r\n GUID: '',\r\n Id: '',\r\n Key: '',\r\n Password: '',\r\n PasswordClear: '',\r\n Question: '',\r\n Reset: '',\r\n Validated: ''\r\n },\r\n error: {\r\n display: false,\r\n text: ''\r\n }\r\n },\r\n modalChangeEmail: {\r\n shown: $location.hash() === 'Email',\r\n email: \"\",\r\n pendingSave: false\r\n }\r\n };\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"1\"\r\n };\r\n\r\n $scope.phoneTypes = constantLists.phoneTypes(localStrings);\r\n $scope.secretQuestions = constantLists.secretQuestions(localStrings);\r\n $scope.data = {};\r\n $scope.kendo = {};\r\n\r\n $scope.clearButton = {\r\n clearButton: false\r\n };\r\n\r\n $scope.canResetPassword = (!angular.isUndefinedOrNullOrEmpty($scope.appInfo.passwordComplexity) && !$scope.appInfo.passwordComplexity.EnforcePasswordComplexity) ||\r\n (WebUserSvc.getNextPasswordResetDate($scope.appInfo.webUser) < 0);\r\n\r\n $scope.hideActiveCheckbox = $scope.hideWebActiveControl($scope.$parent.webFunctions);\r\n\r\n if ($routeParams.contactKey)\r\n {\r\n $scope.customerContactKey = $routeParams.contactKey;\r\n $scope.editWebUser = parseInt($scope.customerContactKey, 10) === $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.Key;\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n //If we are managing someone other than ourselves we need to check to see if the user has permissions.\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.ManageContactsAndSecurity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n }\r\n else\r\n {\r\n $scope.editWebUser = true;\r\n $scope.customerContactKey = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.Key;\r\n $scope.appInfo.webUser.AnswerClear = $scope.appInfo.webUser.Answer;\r\n $scope.appInfo.webUser.AnswerClear2 = $scope.appInfo.webUser.Answer;\r\n $scope.copyUser();\r\n }\r\n\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.CustomerContacts.length === 0)\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"Contacts\"));\r\n\r\n angular.forEach(data.CustomerContacts, function (item)\r\n {\r\n item.DisplayName = item.FirstName + ' ' + item.LastName;\r\n });\r\n $scope.CopyContacts = $filter('orderBy')(data.CustomerContacts, 'DisplayName');\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n\r\n userAccountService.loadContactContext($scope.customerContactKey).then(function (data)\r\n {\r\n data.CustomerContact.WebQuestionAnswer2 = data.CustomerContact.WebQuestionAnswer;\r\n if(data.CustomerContact.TextAddressPhone == null) data.CustomerContact.TextAddressPhone = -1;\r\n\r\n $scope.data = data;\r\n $scope.setAllWebFunctions(false);\r\n setTimeout(function ()\r\n {\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.editUserForm)) {\r\n $scope.$apply($scope.editUserForm.$setPristine());\r\n }\r\n }, 1500);\r\n });\r\n };\r\n\r\n $scope.copyUser = function ()\r\n {\r\n $scope.appInfo.editUser.modalResetPassword.webUser =\r\n {\r\n Timestamp: $scope.appInfo.webUser.Timestamp,\r\n Answer: $scope.appInfo.webUser.Answer,\r\n AnswerClear: $scope.appInfo.webUser.AnswerClear,\r\n GUID: $scope.appInfo.webUser.Guid,\r\n Id: $scope.appInfo.webUser.Id,\r\n Key: $scope.appInfo.webUser.Key,\r\n Password: $scope.appInfo.webUser.Password,\r\n PasswordClear: $scope.appInfo.webUser.Password,\r\n Question: $scope.appInfo.webUser.Question,\r\n Reset: true,\r\n Validated: false\r\n };\r\n };\r\n\r\n $scope.hideWebActiveControl = function (wbFns) {\r\n return $scope.checkCurrentUserPermission(WebFunctions.ManageContactsAndSecurity) ? false : true;\r\n };\r\n\r\n $scope.setAllWebFunctions = function (expand)\r\n {\r\n if ($scope.data.CustomerContact.AllWebFunctions)\r\n {\r\n angular.forEach($scope.data.CustomerContact.CustomerContactWebFunctions, function (item)\r\n {\r\n item.Selected = true;\r\n item.Disabled = true;\r\n });\r\n }\r\n else\r\n {\r\n angular.forEach($scope.data.CustomerContact.CustomerContactWebFunctions, function (item)\r\n {\r\n item.Disabled = false;\r\n });\r\n }\r\n expandWFGrids(expand);\r\n };\r\n\r\n $scope.saveContact = function ()\r\n {\r\n validatorSvc.executeValidations();\r\n\r\n //Validations for both Your Profile and Contacts pages\r\n if ($('#editUserAltEmail').hasClass('validation-error') || $('#editUserEmail').hasClass('validation-error'))\r\n return;\r\n\r\n //Validations only for the Your Profile page\r\n if ($scope.editWebUser)\r\n {\r\n if ($scope.kendo.secretQuestion.$angular_scope.scopeValidationErrors.length > 0)\r\n {\r\n return;\r\n }\r\n\r\n }\r\n\r\n if ($scope.data.MatchingContactCount > 1)\r\n {\r\n $scope.appInfo.editUser.modalMultiSave.shown = true;\r\n return;\r\n }\r\n $scope.saveContactOnly();\r\n };\r\n\r\n /*\r\n * Save contat only and save all contacts will still update the names on all contacts sharing the\r\n * current email address.\r\n * */\r\n $scope.saveContactOnly = function ()\r\n {\r\n $scope.data.CustomerContact.ApplyToAll = false;\r\n $scope.appInfo.editUser.modalMultiSave.shown = false;\r\n $scope.save();\r\n };\r\n\r\n $scope.saveAllContacts = function ()\r\n {\r\n $scope.data.CustomerContact.ApplyToAll = true;\r\n $scope.appInfo.editUser.modalMultiSave.shown = false;\r\n $scope.save();\r\n };\r\n\r\n $scope.save = function ()\r\n {\r\n var contact = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact;\r\n $scope.data.CustomerContact.EditorName = contact.FirstName + \" \" + contact.LastName;\r\n $scope.data.CustomerContact.EditorEmailAddress = $scope.appInfo.webUser.Id;\r\n\r\n $scope.data.CustomerContact.PhoneFormatted = $filter('tel')($scope.data.CustomerContact.Phone);\r\n $scope.data.CustomerContact.AltPhoneFormatted = $filter('tel')($scope.data.CustomerContact.AltPhone);\r\n $scope.data.CustomerContact.AltPhone2Formatted = $filter('tel')($scope.data.CustomerContact.AltPhone2);\r\n $scope.data.CustomerContact.FAXFormatted = $filter('tel')($scope.data.CustomerContact.FAX);\r\n\r\n userAccountService.saveContact($scope.data.CustomerContact).then(function (data)\r\n {\r\n $scope.data.CustomerContact = data.CustomerContact;\r\n if ($scope.appInfo.webUser.Answer !== $scope.appInfo.webUser.AnswerClear)\r\n $scope.saveWebUser();\r\n else\r\n {\r\n if($scope.appInfo.editUser.modalChangeEmail.pendingSave)\r\n $scope.logout();\r\n else\r\n $route.reload();\r\n }\r\n\r\n });\r\n };\r\n\r\n //This part get's messy because we need to save the web user and relaod it into the current application scope\r\n //with out bothering the users...\r\n $scope.saveWebUser = function ()\r\n {\r\n /*If this isn;t the current logged in contact dont update the web user informtion.\r\n This shouldn;t be possible anyway.*/\r\n if (!$scope.editWebUser) return;\r\n\r\n var webUser = angular.copy($scope.appInfo.webUser);\r\n webUser.Id = $scope.data.CustomerContact.EmailAddress;\r\n webUser.Question = $scope.appInfo.webUser.Question;\r\n webUser.AnswerClear = $scope.appInfo.webUser.AnswerClear;\r\n\r\n var token = WebUserSvc.getLoggedInWebUserToken();\r\n WebUserSvc.retrieveWebUserData(token, $scope.appInfo.profileKey).then(function (data) {\r\n webUser.Timestamp = data.Timestamp;\r\n webUser.GUID = null;\r\n\r\n WebUserSvc.saveWebUser(webUser, false).then(function (data) {\r\n var currentCustomerId = $scope.appInfo.webUser.CurrentAuthorization.Customer.ID;\r\n WebUserSvc.retrieveSelectedProfile($scope.appInfo.webUser.Id, $scope.appInfo.profileKey).then(function (data) {\r\n $scope.appInfo.webUser = data;\r\n\r\n if ($scope.appInfo.editUser.modalChangeEmail.pendingSave)\r\n $scope.logout();\r\n else\r\n $route.reload();\r\n });\r\n });\r\n });\r\n };\r\n\r\n $scope.setEditUserSelectedAuthorization = function (id)\r\n {\r\n for (var x = 0; x < $scope.appInfo.webUser.WebAuthorizations.length; x++)\r\n {\r\n if ($scope.appInfo.webUser.WebAuthorizations[x].Customer.ID === id)\r\n {\r\n $scope.appInfo.webUser.CurrentAuthorization = $scope.appInfo.webUser.WebAuthorizations[x];\r\n return;\r\n }\r\n }\r\n };\r\n\r\n $scope.updateContactSecurity = function ()\r\n {\r\n var customerContactKey = $scope.appInfo.editUser.modalCopySecurity.copyContact;\r\n userAccountService.loadContactContext(customerContactKey).then(function (data)\r\n {\r\n var webFunctions = data.CustomerContact.CustomerContactWebFunctions;\r\n var currentContactWebFunctions = $scope.data.CustomerContact.CustomerContactWebFunctions;\r\n $scope.data.CustomerContact.AllWebFunctions = true;\r\n for (var i = 0; i < webFunctions.length; i++)\r\n {\r\n for (var x = 0; x < currentContactWebFunctions.length; x++)\r\n {\r\n if (currentContactWebFunctions[x].WebFnKey === webFunctions[i].WebFnKey)\r\n {\r\n if ($scope.appInfo.editUser.modalCopySecurity.clearSecurity)\r\n currentContactWebFunctions[x].Selected = false;\r\n if (webFunctions[i].Selected)\r\n currentContactWebFunctions[x].Selected = true;\r\n if (!currentContactWebFunctions[x].Selected)\r\n $scope.data.CustomerContact.AllWebFunctions = false;\r\n }\r\n }\r\n }\r\n expandWFGrids(false);\r\n $scope.appInfo.editUser.modalCopySecurity.shown = false;\r\n });\r\n };\r\n\r\n $scope.resetPassword = function ()\r\n {\r\n $scope.goTo('/Account/Profile/ResetPassword');\r\n };\r\n\r\n $scope.questionChanged = function (e)\r\n {\r\n if ($scope.kendo.secretQuestion.$angular_scope.$parent.editUserForm.question.$dirty)\r\n {\r\n $scope.appInfo.webUser.AnswerClear = '';\r\n $scope.appInfo.webUser.AnswerClear2 = '';\r\n }\r\n };\r\n\r\n $scope.showChangeEmailModal = function()\r\n {\r\n if ($location.hash() === 'Email')\r\n {\r\n $route.reload();\r\n } else\r\n {\r\n $location.hash('Email');\r\n }\r\n };\r\n\r\n $scope.hideChangeEmailModal = function()\r\n {\r\n $location.hash('');\r\n };\r\n\r\n $scope.saveChangeEmail = function()\r\n {\r\n validatorSvc.executeValidations();\r\n if ($('#changeEmail').hasClass('validation-error'))\r\n return;\r\n\r\n $scope.appInfo.editUser.modalChangeEmail.shown = false;\r\n $scope.appInfo.editUser.modalChangeEmail.pendingSave = true;\r\n $scope.data.CustomerContact.EmailAddress = $scope.appInfo.editUser.modalChangeEmail.email;\r\n $scope.saveContact();\r\n };\r\n })\r\n .controller(\"AddUserCtrl\", function ($q, $scope, $filter, WebFunctions, userAccountService, validatorSvc, $routeParams, WebUserSvc, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.appInfo.addUser = {\r\n shown: true,\r\n copyContacts: [],\r\n contact: userAccountService.getBlankContact()\r\n };\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.ManageContactsAndSecurity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.CustomerContacts.length === 0)\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"AddContact\"));\r\n\r\n angular.forEach(data.CustomerContacts, function (item)\r\n {\r\n item.DisplayName = item.FirstName + ' ' + item.LastName;\r\n });\r\n $scope.appInfo.addUser.copyContacts = $filter('orderBy')(data.CustomerContacts, 'DisplayName');\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n $scope.appInfo.addUser.shown = true;\r\n };\r\n\r\n $scope.createContact = function ()\r\n {\r\n var validationsPassed = true;\r\n if (!validatorSvc.executeValidations()) {\r\n //Bypass shared scope validations with Contacts/Your Profile pages; we only care about add new contact validations\r\n angular.forEach($scope.scopeValidationErrors, function (value, key) {\r\n if (value.model !== \"data.CustomerContact.EmailAddress\")\r\n validationsPassed = false;\r\n });\r\n }\r\n\r\n if (!validationsPassed)\r\n return;\r\n\r\n if ($scope.updateContactSecurity())\r\n return;\r\n\r\n var contact = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact;\r\n $scope.appInfo.addUser.contact.EditorName = contact.FirstName + \" \" + contact.LastName;\r\n $scope.appInfo.addUser.contact.EditorEmailAddress = $scope.appInfo.webUser.Id;\r\n $scope.appInfo.addUser.contact.CustKey = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n\r\n userAccountService.saveContact($scope.appInfo.addUser.contact).then(function (data)\r\n {\r\n $scope.appInfo.addUser.shown = false;\r\n\r\n if(data.CustomerContact && data.CustomerContact.CustKey === 0)\r\n {\r\n $scope.goTo(\"Account/Profile/Contacts\");\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddNewContact\"),\r\n localStrings.getLocalizedString(\"NewContactNotCreated\"));\r\n }\r\n else\r\n {\r\n $scope.goTo(\"/Account/Profile/YourProfile/\" + data.CustomerContact.Key);\r\n }\r\n });\r\n\r\n };\r\n\r\n $scope.updateContactSecurity = function ()\r\n {\r\n if (!$scope.appInfo.addUser.copyContact) return false;\r\n //if (!$scope.appInfo.addUser.copyContact.Key) return false;\r\n\r\n var customerContactKey = $scope.appInfo.addUser.copyContact;\r\n userAccountService.loadContactContext(customerContactKey).then(function (data)\r\n {\r\n $scope.appInfo.addUser.contact.CustomerContactWebFunctions = data.CustomerContact.CustomerContactWebFunctions;\r\n $scope.appInfo.addUser.contact.AllWebFunctions = data.CustomerContact.AllWebFunctions;\r\n var contact = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact;\r\n $scope.appInfo.addUser.contact.EditorName = contact.FirstName + \" \" + contact.LastName;\r\n $scope.appInfo.addUser.contact.EditorEmailAddress = $scope.appInfo.webUser.Id;\r\n $scope.appInfo.addUser.contact.CustKey = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n userAccountService.saveContact($scope.appInfo.addUser.contact).then(function (data)\r\n {\r\n $scope.appInfo.addUser.shown = false;\r\n\r\n if (data.CustomerContact && data.CustomerContact.CustKey === 0) {\r\n $scope.goTo(\"Account/Profile/Contacts\");\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddNewContact\"),\r\n localStrings.getLocalizedString(\"NewContactNotCreated\"));\r\n }\r\n else {\r\n $scope.goTo(\"/Account/Profile/YourProfile/\" + data.CustomerContact.Key);\r\n }\r\n });\r\n });\r\n return true;\r\n };\r\n\r\n $scope.closeAddUser = function ()\r\n {\r\n $scope.appInfo.addUser.shown = false;\r\n $scope.appInfo.addUser = {};\r\n $scope.goTo(\"/Account/Profile/Contacts\");\r\n };\r\n })\r\n .controller(\"AccountSettingsCtrl\", function ($scope, $filter, WebFunctions, userAccountService, validatorSvc, customerService, WebUserSvc, templates, localStrings, globalizationSvc)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.ViewCreditInformation))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"4\";\r\n $scope.appInfo.pageInfo = {\r\n contacts: [],\r\n primaryCreditContact: 0,\r\n sendBalanceAlerts: $scope.appInfo.webUser.CurrentAuthorization.Customer.SendBalanceAlerts !== 0,\r\n sendBalanceAlertText: localStrings.getLocalizedString(\"SendAlertsBalanceExceeds\"),\r\n balanceAlertThreshold: $scope.appInfo.webUser.CurrentAuthorization.Customer.BalanceAlertThreshold,\r\n prepaidBalance: $scope.appInfo.webUser.CurrentAuthorization.Customer.CrPrePaidBalance !== 0,\r\n balanceAlertThresholdDisplay: globalizationSvc.formatCurrency($scope.appInfo.webUser.CurrentAuthorization.Customer.BalanceAlertThreshold)\r\n };\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.CustomerContacts.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"AccountSettings\"));\r\n }\r\n else\r\n {\r\n angular.forEach(data.CustomerContacts, function (item) {\r\n item.DisplayName = item.FirstName + ' ' + item.LastName;\r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.Customer.CreditContKey === item.Key) {\r\n $scope.appInfo.pageInfo.primaryCreditContact = item.Key;\r\n }\r\n });\r\n $scope.appInfo.pageInfo.contacts = $filter('orderBy')(data.CustomerContacts, 'DisplayName');\r\n $scope.appInfo.pageInfo.primaryCreditContact = ($scope.appInfo.pageInfo.primaryCreditContact === 0) ? $scope.appInfo.pageInfo.contacts[0].Key\r\n : $scope.appInfo.pageInfo.primaryCreditContact;\r\n }\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n if ($scope.appInfo.pageInfo.prepaidBalance)\r\n $scope.appInfo.pageInfo.sendBalanceAlertText = localStrings.getLocalizedString(\"SendAlertsBalanceBelow\");\r\n };\r\n\r\n // This method is used to format the text of the input box whenever we lose focus\r\n $scope.formatCurrency = function ()\r\n {\r\n // If the text is empty or null then do not try to format it\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo.pageInfo.balanceAlertThresholdDisplay))\r\n return;\r\n\r\n // Convert the string to a number and parse it as a float\r\n var num = parseFloat(globalizationSvc.convertStringToNumber($scope.appInfo.pageInfo.balanceAlertThresholdDisplay));\r\n\r\n // Format the number back into a currency string to be displayed\r\n num = globalizationSvc.formatCurrency(num);\r\n\r\n // Set the display value to the currency string\r\n $scope.appInfo.pageInfo.balanceAlertThresholdDisplay = num;\r\n };\r\n\r\n $scope.saveAccountSettings = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n\r\n if ($scope.appInfo.pageInfo.sendBalanceAlerts && !validatorSvc.executeValidations())\r\n return;\r\n\r\n // Convert the display value to a number and parse it as a float so we can save a number and not some currency string\r\n $scope.appInfo.pageInfo.balanceAlertThreshold = parseFloat(globalizationSvc.convertStringToNumber($scope.appInfo.pageInfo.balanceAlertThresholdDisplay));\r\n\r\n customerService.saveCustomerAccountSettings($scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.appInfo.pageInfo.primaryCreditContact,\r\n $scope.appInfo.pageInfo.balanceAlertThreshold,\r\n $scope.appInfo.pageInfo.sendBalanceAlerts).then(function (data)\r\n {\r\n $scope.resetDirtyFlags($scope.settingsForm);\r\n //Reload the web user once customer data has been changed.\r\n var currentCustomerId = $scope.appInfo.webUser.CurrentAuthorization.Customer.ID;\r\n WebUserSvc.retrieveSelectedProfile($scope.appInfo.webUser.Id, $scope.appInfo.profileKey).then(function (data)\r\n {\r\n $scope.appInfo.webUser = data;\r\n for (var x = 0; x < $scope.appInfo.webUser.WebAuthorizations.length; x++)\r\n {\r\n if ($scope.appInfo.webUser.WebAuthorizations[x].Customer.ID === currentCustomerId)\r\n {\r\n $scope.appInfo.webUser.CurrentAuthorization = $scope.appInfo.webUser.WebAuthorizations[x];\r\n return;\r\n }\r\n }\r\n $scope.initialize();\r\n });\r\n // This will function will call will take whatever was saved and convert it back to a currency string to be displayed after save\r\n $scope.formatCurrency();\r\n });\r\n };\r\n })\r\n .controller(\"SetPasswordCtrl\", function ($scope, Authentication, $filter, WebFunctions, userAccountService, validatorSvc, customerService, WebUserSvc, WebProfileService, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.appInfo) $scope.appInfo = {};\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"1\"\r\n };\r\n\r\n var profileKey = ($scope.appInfo && $scope.appInfo.profileKey) ? $scope.appInfo.profileKey : 0;\r\n WebProfileService.getWebProfileMessage(profileKey, 27).then(function (data)\r\n {\r\n $scope.customMessage = data.isBlank() ? localStrings.getLocalizedString(\"ExpiredPassword\") : data;\r\n });\r\n\r\n $scope.appInfo.pageInfo = {\r\n controls: {\r\n oldPassword: '',\r\n password: '',\r\n verify: '',\r\n displayTitle: localStrings.getLocalizedString(\"EnterVerifyPassword\")\r\n },\r\n webUser: {\r\n Timestamp: $scope.appInfo.webUser.Timestamp,\r\n Answer: $scope.appInfo.webUser.Answer,\r\n AnswerClear: $scope.appInfo.webUser.AnswerClear,\r\n GUID: $scope.appInfo.webUser.Guid,\r\n Id: $scope.appInfo.webUser.Id,\r\n Key: $scope.appInfo.webUser.Key,\r\n Password: $scope.appInfo.webUser.Password,\r\n OldPassword: '',\r\n PasswordClear: '',\r\n Question: $scope.appInfo.webUser.Question,\r\n Reset: false, // password reset is only true for forgot password and false for change password\r\n Validated: false\r\n },\r\n error: {\r\n display: false,\r\n text: ''\r\n },\r\n success: false\r\n };\r\n };\r\n\r\n $scope.submitPassword = function ()\r\n {\r\n //$scope.resetPassword.error = [];\r\n\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.setNewPassword();\r\n };\r\n\r\n $scope.setNewPassword = function ()\r\n {\r\n\r\n $scope.appInfo.pageInfo.webUser.OldPassword = $scope.appInfo.pageInfo.controls.oldPassword;\r\n $scope.appInfo.pageInfo.webUser.PasswordClear = $scope.appInfo.pageInfo.controls.password;\r\n\r\n WebUserSvc.resetWebUserPassword($scope.appInfo.pageInfo.webUser).then(\r\n function (data)\r\n {\r\n //store the new webuser record so the timestamps match the db\r\n $scope.appInfo.pageInfo.webUser = data;\r\n\r\n if (data.Validated === true)\r\n {\r\n // If password reset was successful then we need to login again since we dont store anything in local storage so we need a new token.\r\n Authentication.login($scope.appInfo.webUser.Id, $scope.appInfo.pageInfo.controls.password, \"\").then(function (data) {\r\n var user = data;\r\n var token = user.Token;\r\n amplify.store('pnuser-token', token);\r\n\r\n //Reload the web user once the password has been set.\r\n var currentCustomerId = $scope.appInfo.webUser.CurrentAuthorization.Customer.ID;\r\n WebUserSvc.retrieveWebUserData(token, $scope.appInfo.profileKey).then(function (data) {\r\n $scope.appInfo.webUser = data;\r\n for (var x = 0; x < $scope.appInfo.webUser.WebAuthorizations.length; x++) {\r\n if ($scope.appInfo.webUser.WebAuthorizations[x].Customer.ID === currentCustomerId) {\r\n $scope.appInfo.webUser.CurrentAuthorization = $scope.appInfo.webUser.WebAuthorizations[x];\r\n return;\r\n }\r\n }\r\n },\r\n function (err) {\r\n });\r\n\r\n });\r\n //display the conformation page\r\n $scope.appInfo.pageInfo.success = true;\r\n\r\n }\r\n },\r\n function (err)\r\n {\r\n angular.forEach(err, function (item)\r\n {\r\n $scope.notifier.show(item, localStrings.getLocalizedString(\"Error\"));\r\n });\r\n }\r\n );\r\n };\r\n\r\n $scope.clearErrors = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n };\r\n })\r\n .controller(\"auditLogCtrl\", function ($scope, templates, localStrings) {\r\n 'use strict';\r\n\r\n $scope.locationInfo.sideMenuData = {\r\n auditLog: {\r\n auditResults: []\r\n }\r\n };\r\n $scope.kendo = {};\r\n $scope.kendo.auditLogGrid = {};\r\n $scope.kendo.auditLogGridOptions = {\r\n autoBind: false,\r\n change: function (e) {\r\n var selectedRows = this.select();\r\n var dataItem = this.dataItem(selectedRows[0]);\r\n $scope.goTo(\"/Account/Profile/YourProfile/\" + dataItem.Key);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"AudEntryUserID\",\r\n title: localStrings.getLocalizedString(\"ChangedBy\"),\r\n sortable: true,\r\n width: 120,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntryDateTime\",\r\n title: localStrings.getLocalizedString(\"DateTime\"),\r\n sortable: true,\r\n width: 130,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntryAction\",\r\n title: localStrings.getLocalizedString(\"Type\"),\r\n width: 50,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntryMenuCode\",\r\n title: localStrings.getLocalizedString(\"SubjArea\"),\r\n sortable: true,\r\n width: 80,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntryDescription\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n sortable: true,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntDtlsFieldDesc\",\r\n title: localStrings.getLocalizedString(\"FieldName\"),\r\n sortable: true,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntDtlsOldValue\",\r\n title: localStrings.getLocalizedString(\"OldValue\"),\r\n sortable: true,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntDtlsNewValue\",\r\n title: localStrings.getLocalizedString(\"NewValue\"),\r\n sortable: true,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.$parent.auditLogGridInit = function () {\r\n $scope.kendo.auditLogGrid.dataSource.data($scope.locationInfo.sideMenuData.auditLog.auditResults);\r\n };\r\n\r\n $scope.initialize = function () {\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n };\r\n })\r\n .controller(\"auditLogSideMenuCtrl\", function ($scope, validatorSvc, userAccountService, WebFunctions, reportingService, WebProfileService, localizationSvc) {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n $scope.initialize = function () {\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenuLocation = 5;\r\n setTimeout(function() {\r\n $scope.locationInfo.sideMenuData.auditLog = {\r\n includeAdds: true,\r\n includeChanges: true,\r\n includeDeletes: true,\r\n includeActions: true,\r\n subjectArea: null,\r\n changedBy: null,\r\n showContacts: false\r\n };\r\n }, 0);\r\n $scope.subjectAreas = [\r\n { Key: null, Description: localStrings.getLocalizedString(\"All\") },\r\n { Key: \"ARW\", Description: localStrings.getLocalizedString(\"Account\") },\r\n { Key: \"CPW\", Description: localStrings.getLocalizedString(\"FuelCards\") },\r\n { Key: \"ODW\", Description: localStrings.getLocalizedString(\"Orders\") },\r\n { Key: \"DRW\", Description: localStrings.getLocalizedString(\"Paperwork\") },\r\n { Key: \"UAL\", Description: localStrings.getLocalizedString(\"Login\") }\r\n ];\r\n $scope.contactList = [\r\n { EmailAddress: null, DisplayName: localStrings.getLocalizedString(\"Any\") }\r\n ];\r\n if ($scope.checkCurrentUserPermission(WebFunctions.ManageContactsAndSecurity)) {\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data) {\r\n if (data.Successful) {\r\n if (data.CustomerContacts.length === 0) {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Contacts\"), localStrings.getLocalizedString(\"NoResultsFound\"));\r\n return;\r\n }\r\n\r\n angular.forEach(data.CustomerContacts, function (item) {\r\n item.DisplayName = item.EmailAddress;\r\n });\r\n $scope.contactList = data.CustomerContacts\r\n .sortBy('EmailAddress')\r\n .unique('EmailAddress')\r\n .add({ EmailAddress: null, DisplayName: localStrings.getLocalizedString(\"Any\") }, 0);\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n $scope.locationInfo.sideMenuData.auditLog.showContacts = true;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.auditLog.changedBy = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress;\r\n }\r\n $scope.$root.reportSettings.reportKey = 33;\r\n };\r\n\r\n $scope.applyAction = function () {\r\n if (!validatorSvc.executeValidations()) return;\r\n if(!$scope.locationInfo.sideMenuData.auditLog.includeAdds &&\r\n !$scope.locationInfo.sideMenuData.auditLog.includeChanges &&\r\n !$scope.locationInfo.sideMenuData.auditLog.includeDeletes &&\r\n !$scope.locationInfo.sideMenuData.auditLog.includeActions)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AuditLog\"), localStrings.getLocalizedString(\"AtLeastOneType\"));\r\n return;\r\n }\r\n var subjectArea = $scope.locationInfo.sideMenuData.auditLog.subjectArea;\r\n var changedBy = $scope.locationInfo.sideMenuData.auditLog.changedBy;\r\n if(subjectArea === 'null')\r\n subjectArea = null;\r\n if(changedBy === 'null')\r\n changedBy = null;\r\n WebProfileService.getWebAudits(\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate,\r\n subjectArea,\r\n $scope.locationInfo.sideMenuData.auditLog.includeAdds,\r\n $scope.locationInfo.sideMenuData.auditLog.includeChanges,\r\n $scope.locationInfo.sideMenuData.auditLog.includeDeletes,\r\n $scope.locationInfo.sideMenuData.auditLog.includeActions,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n changedBy\r\n ).then(function (data) {\r\n $scope.locationInfo.sideMenuData.auditLog.auditResults = data.WebAuditEntries.each(function(item) {\r\n item.AudEntryDateTime = Date.create(item.AudEntryDateTime).format('{MM}/{dd}/{yyyy} {12hr}:{mm} {tt}');\r\n });\r\n if (data.WebAuditEntries.length === 0) {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AuditLog\"), localStrings.getLocalizedString(\"NoResultsFound\"));\r\n return;\r\n }\r\n $scope.auditLogGridInit();\r\n });\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n $scope.locationInfo.sideMenuData.auditLog.includeAdds = $scope.reportSettings.loadOptions.includeAdds;\r\n $scope.locationInfo.sideMenuData.auditLog.includeChanges = $scope.reportSettings.loadOptions.includeChanges;\r\n $scope.locationInfo.sideMenuData.auditLog.includeDeletes = $scope.reportSettings.loadOptions.includeDeletes;\r\n $scope.locationInfo.sideMenuData.auditLog.includeActions = $scope.reportSettings.loadOptions.includeActions;\r\n\r\n var subjectArea = $scope.reportSettings.loadOptions.subjectArea;\r\n var changedBy = $scope.reportSettings.loadOptions.changedBy;\r\n if(subjectArea === 'null')\r\n subjectArea = null;\r\n if(changedBy === 'null')\r\n changedBy = null;\r\n $scope.locationInfo.sideMenuData.auditLog.subjectArea = subjectArea;\r\n $scope.locationInfo.sideMenuData.auditLog.changedBy = changedBy;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n $scope.reportSettings.saveOptions.includeAdds = $scope.locationInfo.sideMenuData.auditLog.includeAdds;\r\n $scope.reportSettings.saveOptions.includeChanges = $scope.locationInfo.sideMenuData.auditLog.includeChanges;\r\n $scope.reportSettings.saveOptions.includeDeletes = $scope.locationInfo.sideMenuData.auditLog.includeDeletes;\r\n $scope.reportSettings.saveOptions.includeActions = $scope.locationInfo.sideMenuData.auditLog.includeActions;\r\n $scope.reportSettings.saveOptions.subjectArea = $scope.locationInfo.sideMenuData.auditLog.subjectArea;\r\n $scope.reportSettings.saveOptions.changedBy = $scope.locationInfo.sideMenuData.auditLog.changedBy;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n var subjectArea = $scope.locationInfo.sideMenuData.auditLog.subjectArea;\r\n var changedBy = $scope.locationInfo.sideMenuData.auditLog.changedBy;\r\n var qs = \"reportName=\" + 'AuditLog' +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-StartDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-EndDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-IncludeAdds=\" + $scope.locationInfo.sideMenuData.auditLog.includeAdds +\r\n \"&RP-IncludeChanges=\" + $scope.locationInfo.sideMenuData.auditLog.includeChanges +\r\n \"&RP-IncludeDeletes=\" + $scope.locationInfo.sideMenuData.auditLog.includeDeletes +\r\n \"&RP-IncludeActions=\" + $scope.locationInfo.sideMenuData.auditLog.includeActions;\r\n if(subjectArea !== 'null')\r\n qs = qs + \"&RP-SubjectArea=\" + subjectArea;\r\n if(changedBy !== 'null')\r\n qs = qs + \"&RP-ChangedBy=\" + changedBy;\r\n\r\n reportingService.exportReport(qs, args.format);\r\n });\r\n });\r\n","/**\r\n * Created by rhampton on 3/24/14.\r\n */\r\nangular.module(\"pnAccountReports\", ['core.objects', 'services.customers'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/Account/Reports/RecentActivity\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"RecentActivity\"),\r\n controller: \"recentActivityCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/Invoices\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Invoices\"),\r\n controller: \"invoicesCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/PaymentHistory\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PaymentHistory\"),\r\n controller: \"paymentHistoryCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/TransactionHistory\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionHistory\"),\r\n controller: \"transactionHistoryCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/ScheduledPayments\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ScheduledPayments\"),\r\n controller: \"scheduledPaymentsCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/UnappliedPayments\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"UnappliedPayments\"),\r\n controller: \"unappliedPaymentsCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/CreditCardActivity\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"CreditCardActivity\"),\r\n controller: \"creditCardActivityCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/TenNinetyNine\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TenNinetyNine\"),\r\n controller: \"tenNinetyNineCtrl\"\r\n }\r\n )\r\n\r\n;\r\n})\r\n .controller('reportSideMenuCtrl', function ($scope, WebFunctions, customerService, $filter)\r\n{\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n };\r\n })\r\n .controller('reportSideMenuInvoicesCtrl', function ($scope, validatorSvc, WebFunctions, reportingService, Authentication, templates, customerService, $filter, localizationSvc)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"AccountReportLocalization\");\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.invoices) $scope.locationInfo.sideMenuData.invoices = {};\r\n $scope.locationInfo.sideMenuData.invoices.reportType = 'InvoiceByDateRange';\r\n $scope.locationInfo.sideMenuData.invoices.reportTypeDetail = 'InvoiceByDateRangeDetail';\r\n $scope.locationInfo.sideMenuData.invoices.outstandingOnly = 'True';\r\n $scope.locationInfo.sideMenuData.invoices.showReportDetail = 'False';\r\n $scope.$root.reportSettings.reportKey = 2;\r\n\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.selection = 13;\r\n\r\n customerService.getCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, 1).then(function (data) {\r\n $scope.locations = $filter('filter')(data.Locations, { Active: '!0' });\r\n $scope.locations.unshift({\r\n Active: -1,\r\n Description: localStrings.getLocalizedString(\"All\"),\r\n Key: 0\r\n });\r\n setTimeout(function () {\r\n $scope.locationInfo.sideMenuData.invoices.location = 0;\r\n }, 0);\r\n });\r\n\r\n $scope.location = 0;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.invoices.outstandingOnly = $scope.reportSettings.loadOptions.outstandingOnly;\r\n $scope.locationInfo.sideMenuData.invoices.showReportDetail = $scope.reportSettings.loadOptions.showReportDetail;\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.outstandingOnly = $scope.locationInfo.sideMenuData.invoices.outstandingOnly;\r\n $scope.reportSettings.saveOptions.showReportDetail = $scope.locationInfo.sideMenuData.invoices.showReportDetail;\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var reportName = $scope.locationInfo.sideMenuData.invoices.showReportDetail === 'True' ?\r\n $scope.locationInfo.sideMenuData.invoices.reportTypeDetail :\r\n $scope.locationInfo.sideMenuData.invoices.reportType;\r\n\r\n var qs = \"reportName=\" + reportName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-HideZeroBalance=\" + $scope.locationInfo.sideMenuData.invoices.outstandingOnly +\r\n \"&RP-startDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-endDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-showReportDetail=\" + $scope.locationInfo.sideMenuData.invoices.showReportDetail + \r\n \"&RP-ShipToKey=\" + $scope.locationInfo.sideMenuData.invoices.location;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller('reportSideMenuTransactionHistoryCtrl', function ($scope, validatorSvc, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.transactionHistory) $scope.locationInfo.sideMenuData.transactionHistory = {};\r\n $scope.locationInfo.sideMenuData.transactionHistory.reportType = 'TransactionHistory';\r\n $scope.locationInfo.sideMenuData.transactionHistory.showReportDetail = 'False';\r\n $scope.$root.reportSettings.reportKey = 6;\r\n\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var qs = \"reportName=\" + $scope.locationInfo.sideMenuData.transactionHistory.reportType +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-startDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-endDate=\" + $scope.dateSelector.endDate;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller('reportSideMenuCreditCardActivityCtrl', function ($scope, validatorSvc, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.creditCardActivity) $scope.locationInfo.sideMenuData.creditCardActivity = {};\r\n $scope.locationInfo.sideMenuData.creditCardActivity.groupByDate = 0;\r\n $scope.locationInfo.sideMenuData.creditCardActivity.showReportDetail = 'False';\r\n $scope.locationInfo.sideMenuData.creditCardActivity.pending = '0';\r\n $scope.$root.reportSettings.reportKey = 7;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.creditCardActivity.groupByDate = $scope.reportSettings.saveOptions.groupByDate;\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n $scope.setReport();\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.groupByDate = $scope.locationInfo.sideMenuData.creditCardActivity.groupByDate;\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var reportType = $scope.locationInfo.sideMenuData.creditCardActivity.groupByDate === 1 ? 'CreditCardActivityByDate' : 'CreditCardActivityByDescription';\r\n var qs = \"reportName=\" + reportType +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-startDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-endDate=\" + $scope.dateSelector.endDate;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller('reportSideMenuScheduledPaymentsCtrl', function ($scope, validatorSvc, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.scheduledPayments) $scope.locationInfo.sideMenuData.scheduledPayments = {};\r\n $scope.locationInfo.sideMenuData.scheduledPayments.reportType = 'ScheduledPaymentsAndEfts';\r\n $scope.locationInfo.sideMenuData.scheduledPayments.reportTypeDetail = 'ScheduledPaymentsAndEftsDetail';\r\n\r\n $scope.locationInfo.sideMenuData.scheduledPayments.showReportDetail = 'False';\r\n $scope.locationInfo.sideMenuData.scheduledPayments.pending = '0';\r\n $scope.$root.reportSettings.reportKey = 5;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.scheduledPayments.pending = $scope.reportSettings.loadOptions.pending;\r\n $scope.locationInfo.sideMenuData.scheduledPayments.showReportDetail = $scope.reportSettings.loadOptions.showReportDetail;\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.pending = $scope.locationInfo.sideMenuData.scheduledPayments.pending;\r\n $scope.reportSettings.saveOptions.showReportDetail = $scope.locationInfo.sideMenuData.scheduledPayments.showReportDetail;\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var reportName = $scope.locationInfo.sideMenuData.scheduledPayments.showReportDetail === 'True' ?\r\n $scope.locationInfo.sideMenuData.scheduledPayments.reportTypeDetail :\r\n $scope.locationInfo.sideMenuData.scheduledPayments.reportType;\r\n\r\n var qs = \"reportName=\" + reportName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-startDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-endDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-pending=\" + $scope.locationInfo.sideMenuData.scheduledPayments.pending +\r\n \"&RP-showReportDetail=\" + $scope.locationInfo.sideMenuData.scheduledPayments.showReportDetail;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller('reportSideMenuPaymentHistoryCtrl', function ($scope, validatorSvc, $rootScope, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.paymentHistory) $scope.locationInfo.sideMenuData.paymentHistory = {};\r\n $scope.locationInfo.sideMenuData.paymentHistory.showReportDetail = false;\r\n $scope.$root.reportSettings.reportKey = 3;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.paymentHistory.showReportDetail = $scope.reportSettings.loadOptions.showReportDetail;\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.showReportDetail = $scope.locationInfo.sideMenuData.paymentHistory.showReportDetail;\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = $scope.locationInfo.sideMenuData.paymentHistory.showReportDetail ? 'PaymentHistoryIAD' : 'PaymentHistory';\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-startDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-endDate=\" + $scope.dateSelector.endDate;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller('reportSideMenuTenNinetyNineCtrl', function ($scope, validatorSvc, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.tenNinetyNine) $scope.locationInfo.sideMenuData.tenNinetyNine = {};\r\n $scope.locationInfo.sideMenuData.tenNinetyNine.reportType = '1099-KByDate';\r\n $scope.locationInfo.sideMenuData.tenNinetyNine.useDateRange = '1';\r\n $scope.$root.reportSettings.reportKey = 8;\r\n $scope.exportReport = false;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var qs = \"reportName=\" + $scope.locationInfo.sideMenuData.tenNinetyNine.reportType +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-StartDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-EndDate=\" + $scope.dateSelector.endDate;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller(\"recentActivityCtrl\", function ($scope, WebFunctions, WebFunctionGroups, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermissions(WebFunctionGroups.AccountReports) || !$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n if ($scope.checkCurrentUserPermissions(WebFunctionGroups.AccountPayments))\r\n $scope.goTo(\"/Account/Payments/ViewScheduledPayments\");\r\n else\r\n $scope.goTo(\"/Account/Profile/YourProfile\");\r\n return;\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.recentActivity) $scope.locationInfo.sideMenuData.recentActivity = {};\r\n $scope.locationInfo.sideMenuData.recentActivity.reportType = '/RecentActivity';\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n $scope.custKey = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n $scope.exportReport = \"false\";\r\n $scope.applyAction();\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n var qs = \"reportName=\" + $scope.locationInfo.sideMenuData.recentActivity.reportType +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller(\"invoicesCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.invoices) $scope.locationInfo.sideMenuData.invoices = {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n };\r\n })\r\n .controller(\"paymentHistoryCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n })\r\n .controller(\"transactionHistoryCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"8\";\r\n })\r\n .controller(\"scheduledPaymentsCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n })\r\n .controller(\"creditCardActivityCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"6\";\r\n })\r\n .controller(\"unappliedPaymentsCtrl\", function ($scope, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"4\";\r\n $scope.locationInfo.sideMenuData.unappliedPayments = {};\r\n $scope.locationInfo.sideMenuData.unappliedPayments.reportType = '/UnappliedPayments';\r\n $scope.applyAction();\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n var qs = \"reportName=\" + $scope.locationInfo.sideMenuData.unappliedPayments.reportType +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller(\"tenNinetyNineCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"7\";\r\n })\r\n;","/**\r\n * Created by jvitoria on 9/5/14.\r\n */\r\nangular.module(\"pnFuelCardsCards\", ['core.objects'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/FuelCards/Cards/ViewCards\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewCards\"),\r\n controller: \"viewCardsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Cards/AddCards\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AddCards\"),\r\n controller: \"addCardsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Cards/AddTemplates\",\r\n {\r\n templateUrl: \"fuelCards/cards/addTemplates/addTemplates.tpl.html\",\r\n controller: \"addTemplatesCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Cards/Departments\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Departments\"),\r\n controller: \"departmentsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Cards/DepartmentSetup\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"DepartmentSetup\"),\r\n controller: \"departmentSetupCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Cards/Locations\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Locations\"),\r\n controller: \"locationsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n ;\r\n })\r\n .controller('fuelCardsCardsSideMenuCtrl', function ($scope, $rootScope, FuelCardsService)\r\n {\r\n 'use strict';\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n };\r\n })\r\n .controller(\"viewCardsCtrl\", function ($scope, FuelCardsService, WebFunctions, WebFunctionGroups, customerService, validatorSvc, $filter, $q, $timeout, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n if (!$scope.appInfo.fuelCards)\r\n $scope.appInfo.fuelCards = {};\r\n $scope.appInfo.fuelCards.viewCards = {shown: true};\r\n $scope.appInfo.fuelCards.modalEdit = {shown: false};\r\n $scope.appInfo.fuelCards.modalPin = {shown: false};\r\n $scope.appInfo.fuelCards.modalReissue = {shown: false};\r\n $scope.appInfo.fuelCards.modalDeactivate = {shown: false};\r\n $scope.appInfo.fuelCards.modalChangeCardNo = {shown: false, mode: 'edit'};\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.viewCardsGrid = {};\r\n $scope.kendo.viewCardsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n $scope.displayFuelCard(dataItem.Key);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"Description\",\r\n title: localStrings.getLocalizedString(\"CardDescription\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Status\",\r\n title: localStrings.getLocalizedString(\"Status\"),\r\n width: 100,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"ActivationDate\",\r\n title: localStrings.getLocalizedString(\"ActivationDate\"),\r\n width: 100,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"ExpirationDate\",\r\n title: localStrings.getLocalizedString(\"ExpirationDate\"),\r\n width: 100,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \" \",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n //height: $(document).height() - 375,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.viewCardsGridInit = function ()\r\n {\r\n $scope.kendo.viewCardsGridDS = new kendo.data.DataSource({\r\n data: $scope.appInfo.fuelCards.viewCards.cards\r\n });\r\n\r\n $scope.kendo.viewCardsGridDS.read();\r\n $scope.kendo.viewCardsGrid.dataSource.data($scope.kendo.viewCardsGridDS.data());\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n $scope.appInfo.fuelCards.viewCards.cards = [];\r\n $scope.modalifier.hide();\r\n $scope.appInfo.fuelCards.viewCards.shown = true;\r\n $scope.appInfo.fuelCards.modalEdit.shown = false;\r\n $scope.appInfo.fuelCards.modalReissue.shown = false;\r\n $scope.appInfo.fuelCards.modalReissue.shown = false;\r\n $scope.appInfo.fuelCards.modalDeactivate.shown = false;\r\n FuelCardsService.getCards\r\n (\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.locationInfo.sideMenuData.viewCards.cardFormat,\r\n $scope.locationInfo.sideMenuData.viewCards.cardNumber,\r\n $scope.locationInfo.sideMenuData.viewCards.active === \"True\" ? -1 : 0,\r\n $scope.locationInfo.sideMenuData.viewCards.expired === \"True\" ? -1 : 0,\r\n $scope.locationInfo.sideMenuData.viewCards.pending === \"True\" ? -1 : 0,\r\n $scope.locationInfo.sideMenuData.viewCards.locked === \"True\" ? -1 : 0,\r\n $scope.locationInfo.sideMenuData.viewCards.cancelled === \"True\" ? -1 : 0,\r\n $scope.locationInfo.sideMenuData.viewCards.department,\r\n $scope.locationInfo.sideMenuData.viewCards.template\r\n ).then\r\n (\r\n function (data)\r\n {\r\n if (data.Cards.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"Cards\"));\r\n return;\r\n }\r\n\r\n $scope.appInfo.fuelCards.viewCards.cards = [];\r\n angular.forEach(data.Cards, function (item)\r\n {\r\n var desc = item.NumberMasked + ' - ' + item.Description;\r\n desc += item.Template === -1 ? ' (Template)' : '';\r\n\r\n var status = $filter('filter')($scope.appInfo.fuelCards.statusCodes, {Key: item.Status});\r\n\r\n var act = $filter('date')(item.ActivationDate, 'MM/dd/yyyy') || '';\r\n var exp = $filter('date')(item.ExpirationDate, 'MM/dd/yyyy') || '';\r\n\r\n $scope.appInfo.fuelCards.viewCards.cards.push({\r\n Key: item.Key,\r\n Sort: item.Description,\r\n Description: desc,\r\n Status: status[0].Description,\r\n ActivationDate: act,\r\n ExpirationDate: exp\r\n });\r\n });\r\n $scope.kendo.viewCardsGridInit();\r\n }\r\n );\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n //if user doesnt have permission for the section landing page, test to see if they can land on another one\r\n //before sending them to the home page\r\n if (!$scope.checkCurrentUserPermissions(WebFunctionGroups.FuelCardsCards))\r\n {\r\n if ($scope.checkCurrentUserPermissions(WebFunctionGroups.FuelCardsTrans))\r\n $scope.goTo(\"/FuelCards/Transactions/TransactionDetails\");\r\n else if ($scope.checkCurrentUserPermissions(WebFunctionGroups.FuelCardsPrices))\r\n $scope.goTo(\"/FuelCards/Prices/LookupPrices\");\r\n else\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 40;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsCardsSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"0\";\r\n\r\n $scope.appInfo.fuelCards.statusCodes = [\r\n { Key: '0', Description: localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"Active\")) },\r\n { Key: '1', Description: localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"Cancelled\")) },\r\n { Key: '2', Description: localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"Expired\")) },\r\n { Key: '3', Description: localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"Locked\")) },\r\n { Key: '4', Description: localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"Pending\")) }\r\n ];\r\n $scope.appInfo.fuelCards.viewCards.cards = [];\r\n FuelCardsService.getCardsContext(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey\r\n ).then(\r\n function (data) {\r\n $scope.appInfo.fuelCards.formats = $filter('orderBy')(data.CardFormats, 'Description');\r\n $scope.appInfo.fuelCards.embossingReasons = $filter('orderBy')(data.CardEmbossingReasons, 'Description');\r\n $scope.appInfo.fuelCards.deactivateReasons = $filter('orderBy')(data.CardDeactivationReasons, 'Description');\r\n $scope.appInfo.fuelCards.states = data.States;\r\n $scope.appInfo.fuelCards.alertRules = $filter('orderBy')(data.CardAlertRules, 'ID');\r\n $scope.appInfo.fuelCards.templates = $filter('orderBy')(data.CustomerCardTemplates, 'Description');\r\n $scope.appInfo.fuelCards.company = data.Company;\r\n }\r\n );\r\n\r\n FuelCardsService.getCardsDepartments($scope.appInfo.webUser.CurrentAuthorization.CustKey)\r\n .then(function (data) {\r\n if (data.Successful) {\r\n $scope.appInfo.fuelCards.departments = $filter('orderBy')(data.Departments, 'Description');\r\n }\r\n }\r\n );\r\n\r\n customerService.getCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, 2)\r\n .then(function (data) {\r\n if (data.Successful) {\r\n $scope.appInfo.fuelCards.locations = $filter('orderBy')(data.Locations, 'Description');\r\n }\r\n }\r\n );\r\n\r\n $scope.hideModals();\r\n };\r\n\r\n $scope.saveCards = function (state)\r\n {\r\n var recStatus = 0;\r\n var closeModal = false;\r\n var card = $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0];\r\n\r\n if (card.Description.isBlank())\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"Required\"), 'error');\r\n $scope.setFocusOnReady('#efc-description');\r\n return;\r\n }\r\n\r\n switch (state)\r\n {\r\n case 'save':\r\n recStatus = 16;\r\n break;\r\n\r\n case 'saveAndClose':\r\n recStatus = 16;\r\n closeModal = true;\r\n break;\r\n\r\n case 'saveCN':\r\n recStatus = 16;\r\n card.Number_Formatted = null;\r\n card.Number_Masked = null;\r\n break;\r\n\r\n case 'add':\r\n recStatus = 4;\r\n break;\r\n\r\n case 'template':\r\n\r\n if (!$scope.isValidForWebTemplate(card))\r\n return;\r\n\r\n recStatus = 4;\r\n card.Number = 0;\r\n card.NumberMasked = null;\r\n card.Template = \"-1\";\r\n card.PIN = null;\r\n card.Activation_Date = null;\r\n card.Expiration_Date = null;\r\n card.Cards_Issued = '0';\r\n card.Emboss_Date = null;\r\n card.Emboss_Line_1 = null;\r\n card.Emboss_Line_2 = null;\r\n card.Emboss_Line_3 = null;\r\n card.Export_To_Embosser = '0';\r\n card.Marked_For_Export = '0';\r\n card.Last_Emboss_Date = null;\r\n card.CardDeactRsn_Key = 0;\r\n card.Deactivation_Date = null;\r\n card.HasTransactions = '0';\r\n card.Key = 0;\r\n card.TimeStamp = null;\r\n card.Status = $scope.securityOptions.allowPending ? '4' : '0';\r\n closeModal = true;\r\n break;\r\n }\r\n\r\n FuelCardsService.saveCards\r\n (\r\n recStatus,\r\n card,\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardCFs[0],\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n ).then\r\n (\r\n function (data)\r\n {\r\n if (!closeModal)\r\n $scope.displayFuelCard(card.Key);\r\n else\r\n $scope.initialize();\r\n\r\n $scope.resetDirtyFlags($scope.editCards);\r\n }\r\n );\r\n };\r\n\r\n $scope.displayFuelCard = function (key)\r\n {\r\n FuelCardsService.getCardDetails\r\n (\r\n key,\r\n $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers)\r\n ).then\r\n (\r\n function (data)\r\n {\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails = data.CardDetails;\r\n $scope.appInfo.fuelCards.modalEdit.origCardDetails = angular.copy(data.CardDetails);\r\n\r\n $scope.setSecurityOptions();\r\n $scope.resetDirtyFlags($scope.editCards);\r\n }\r\n );\r\n };\r\n\r\n $scope.displayModelPin = function (state)\r\n {\r\n switch (state)\r\n {\r\n case 'display':\r\n $scope.saveChangesPrompt();\r\n validatorSvc.clearAllValidations();\r\n $scope.appInfo.fuelCards.modalPin.PIN1 = null;\r\n $scope.appInfo.fuelCards.modalPin.PIN2 = null;\r\n $scope.appInfo.fuelCards.modalPin.error = false;\r\n $scope.appInfo.fuelCards.modalPin.shown = true;\r\n break;\r\n\r\n case 'save':\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].PIN = $scope.appInfo.fuelCards.modalPin.PIN1;\r\n $scope.appInfo.fuelCards.modalPin.shown = false;\r\n $scope.saveCards('save');\r\n break;\r\n }\r\n };\r\n\r\n $scope.displayModelReissue = function (state)\r\n {\r\n switch (state)\r\n {\r\n case 'display':\r\n $scope.saveChangesPrompt();\r\n $scope.appInfo.fuelCards.modalReissue.selection = $scope.appInfo.fuelCards.embossingReasons[0].Key;\r\n $scope.appInfo.fuelCards.modalReissue.shown = true;\r\n break;\r\n\r\n case 'save':\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].CardEmbRsn_Key = $scope.appInfo.fuelCards.modalReissue.selection;\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].Export_To_Embosser = '-1';\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].Emboss_Date = new Date();\r\n $scope.appInfo.fuelCards.modalReissue.shown = false;\r\n $scope.saveCards('save');\r\n break;\r\n }\r\n };\r\n\r\n $scope.displayModelDeactReasons = function (state)\r\n {\r\n switch (state)\r\n {\r\n case 'display':\r\n $scope.saveChangesPrompt();\r\n $scope.appInfo.fuelCards.modalDeactivate.selection = $scope.appInfo.fuelCards.deactivateReasons[0].Key;\r\n $scope.appInfo.fuelCards.modalDeactivate.shown = true;\r\n break;\r\n\r\n case 'save':\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].CardDeactRsn_Key = $scope.appInfo.fuelCards.modalDeactivate.selection;\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].Status = '1';\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].Deactivation_Date = new Date().toISOString().slice(0, 19);\r\n $scope.appInfo.fuelCards.modalDeactivate.shown = false;\r\n $scope.saveCards('save');\r\n break;\r\n }\r\n };\r\n\r\n $scope.displayChangeCardNo = function (command)\r\n {\r\n switch (command)\r\n {\r\n case 'open':\r\n $scope.saveChangesPrompt().then(\r\n function ()\r\n {\r\n $scope.saveCards('save');\r\n $scope.appInfo.fuelCards.modalChangeCardNo.mode = 'edit';\r\n $scope.appInfo.fuelCards.modalChangeCardNo.shown = true;\r\n },\r\n function ()\r\n {\r\n $scope.appInfo.fuelCards.modalChangeCardNo.mode = 'edit';\r\n $scope.appInfo.fuelCards.modalChangeCardNo.shown = true;\r\n }\r\n );\r\n break;\r\n\r\n case 'save':\r\n if ($scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].HasTransactions === '-1')\r\n $scope.appInfo.fuelCards.modalChangeCardNo.mode = 'confirm';\r\n else\r\n {\r\n $scope.saveCards('saveCN');\r\n $scope.displayChangeCardNo(localStrings.getLocalizedString(\"Close\"));\r\n }\r\n break;\r\n\r\n case 'confirm':\r\n $scope.saveCards('saveCN');\r\n $scope.displayChangeCardNo(localStrings.getLocalizedString(\"Close\"));\r\n break;\r\n\r\n case 'close':\r\n $scope.appInfo.fuelCards.modalChangeCardNo.shown = false;\r\n $scope.appInfo.fuelCards.modalChangeCardNo.mode = 'edit';\r\n break;\r\n }\r\n };\r\n\r\n $scope.hideModals = function ()\r\n {\r\n $scope.appInfo.fuelCards.viewCards.shown = true;\r\n $scope.appInfo.fuelCards.modalEdit.shown = false;\r\n $scope.appInfo.fuelCards.modalReissue.shown = false;\r\n $scope.appInfo.fuelCards.modalReissue.shown = false;\r\n $scope.appInfo.fuelCards.modalDeactivate.shown = false;\r\n $scope.appInfo.fuelCards.modalChangeCardNo.shown = false;\r\n validatorSvc.clearAllValidations();\r\n };\r\n\r\n $scope.isValidForWebTemplate = function (card)\r\n {\r\n var isValid = true;\r\n var format = $filter('filter')($scope.appInfo.fuelCards.formats, {Key: card.CardFmt_Key}, true)[0] || {};\r\n\r\n if (angular.isUndefinedOrNullOrEmpty(format) || format.VisibleOnWeb === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"CardFormatInvalid\"), 'error');\r\n return false;\r\n }\r\n\r\n if (card.Template === '-1')\r\n {\r\n angular.forEach($scope.appInfo.fuelCards.templates, function (item)\r\n {\r\n if (card.Description === item.Description)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"TemplateDescriptionUnique\"), 'error');\r\n isValid = false;\r\n }\r\n\r\n //if(card.Number === item.Number)\r\n //{\r\n // $scope.notifier.show('Template card number must be unique', 'error');\r\n // isValid = false;\r\n //}\r\n });\r\n }\r\n\r\n //physical card w/o auto number or pending\r\n if (format.PhysicalCard === -1 && format.AutoNo === 0 && format.AllowPending === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"PhysicalCardsError\"), 'error');\r\n isValid = false;\r\n }\r\n\r\n //expiration dates\r\n if (format.UseExpirationDates === -1 && format.DefaultLifetimeSelection === 0 && format.AllowDefaultByCustomer === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ExpirationDateConfiguredError\"), 'error');\r\n isValid = false;\r\n }\r\n\r\n //expiration dates\r\n if (format.UseExpirationDates === -1 && format.AllowDefaultByCustomer === -1)\r\n {\r\n\r\n var nextDate = angular.isUndefinedOrNullOrEmpty(card.Next_Exp_Date) ? new Date('01/01/1900') : new Date(card.Next_Exp_Date);\r\n var expDate = angular.isUndefinedOrNullOrEmpty(card.Expiration_Date) ? new Date('01/01/1900') : new Date(card.Expiration_Date);\r\n var today = new Date();\r\n\r\n if (expDate <= today && nextDate <= today)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"MissingExpirationDate\"), 'error');\r\n isValid = false;\r\n }\r\n }\r\n\r\n return isValid;\r\n };\r\n\r\n $scope.saveChangesPrompt = function ()\r\n {\r\n var deferred = $q.defer();\r\n if ($scope.editCards.$dirty)\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"UnsavedChanges\"), deferred.resolve, deferred.reject);\r\n else\r\n deferred.reject();\r\n\r\n return deferred.promise;\r\n };\r\n\r\n $scope.setSecurityOptions = function ()\r\n {\r\n\r\n $scope.securityOptions = {\r\n readOnly: true,\r\n formTitle: '',\r\n\r\n viewCardNumber: false,\r\n displayCardNumber: '',\r\n canChangeCardNo: false,\r\n\r\n showVehicleInfo: false,\r\n showCardAuths: false,\r\n showProdSite: false,\r\n showTaxExemeptions: false,\r\n showEmbossingAlert: false,\r\n\r\n showChangePin: false,\r\n showReissue: false,\r\n reissueTitle: '',\r\n showDeactivate: false,\r\n showSaveTemplate: false,\r\n\r\n shipToLocation: '',\r\n cardType: '',\r\n department: '',\r\n format: '',\r\n state: '',\r\n cardStatus: '',\r\n deactivationReason: '',\r\n embossingReason: '',\r\n alertRule: ''\r\n };\r\n\r\n function keyLookup(list, match, field, value)\r\n {\r\n if(!Object.isArray(list) || list.length === 0 || angular.isUndefinedOrNullOrEmpty(match)|| angular.isUndefinedOrNullOrEmpty(field))\r\n return value;\r\n\r\n var item = list.find({Key: match});\r\n\r\n if (item)\r\n return item[field];\r\n else\r\n return value;\r\n }\r\n\r\n var card = $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0];\r\n var format = $filter('filter')($scope.appInfo.fuelCards.formats, {Key: card.CardFmt_Key}, true)[0];\r\n\r\n //sanity check\r\n if (!card || !format)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Cards\"), localStrings.getLocalizedString(\"CardSelectionFailed\"));\r\n return;\r\n }\r\n\r\n //form options\r\n $scope.securityOptions.readOnly = !($scope.checkCurrentUserPermission(WebFunctions.EditCards) &&\r\n (format.AllowEditAfterEmbossed === -1 ||\r\n card.Cards_Issued === '0'));\r\n $scope.securityOptions.formTitle = $scope.securityOptions.readOnly ? localStrings.getLocalizedString(\"ViewCard\") : localStrings.getLocalizedString(\"EditCard\");\r\n $scope.securityOptions.formTitle += card.Template === \"-1\" ? ' Template' : '';\r\n $scope.securityOptions.allowPending = format.AllowPending === -1;\r\n\r\n //card number options\r\n $scope.securityOptions.autoNo = format.AutoNo === -1;\r\n $scope.securityOptions.maxCardNoLength = format.Mask.match(/0/g).length || 20;\r\n $scope.securityOptions.canChangeCardNo = !$scope.securityOptions.readOnly && !$scope.securityOptions.autoNo && $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers);\r\n\r\n // section visibility options\r\n $scope.securityOptions.showEmbossingAlert = card.Export_To_Embosser === '-1';\r\n $scope.securityOptions.showCardAuths = $scope.securityOptions.readOnly ||\r\n card.CardAlertRule_Key > 0 ||\r\n card.Max_Trans_PerDay > 0 ||\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardCFs.length > 0;\r\n $scope.securityOptions.showVehicleInfo = format.AllowVehicleInfo === -1;\r\n $scope.securityOptions.showProdSite = card.Auth_By_Product !== '0' && card.Single_Site_Auth_Site_Key !== 0;\r\n $scope.securityOptions.showTaxExemeptions = $scope.appInfo.fuelCards.modalEdit.cardDetails.CardTaxExs.length > 0;\r\n\r\n // button options\r\n $scope.securityOptions.showSave = !$scope.securityOptions.readOnly;\r\n $scope.securityOptions.showChangePin = !$scope.securityOptions.readOnly && format.AllowPIN !== 0;\r\n $scope.securityOptions.showReissue = !$scope.securityOptions.readOnly;\r\n $scope.securityOptions.reissueTitle = format.PhysicalCard === 0 ? localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"ActivateCard\")) : localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"ReissueCard\"));\r\n $scope.securityOptions.showDeactivate = !$scope.securityOptions.readOnly;\r\n $scope.securityOptions.showSaveTemplate = $scope.checkCurrentUserPermission(WebFunctions.AddNewCards);\r\n\r\n // child field lookups\r\n $scope.securityOptions.shipToLocation = keyLookup($scope.appInfo.fuelCards.locations, card.CustLocKey, 'ID', '(Default)');\r\n $scope.securityOptions.format = format.Description;\r\n $scope.securityOptions.department = keyLookup($scope.appInfo.fuelCards.departments, card.CardDptKey, 'Description', '');\r\n $scope.securityOptions.state = keyLookup($scope.appInfo.fuelCards.states, card.Vehicle_State_Key, 'Description', '');\r\n $scope.securityOptions.cardType = card.Type === \"0\" ? 'Card Holder' : 'Vehicle Card';\r\n $scope.securityOptions.cardStatus = keyLookup($scope.appInfo.fuelCards.statusCodes, card.Status, 'Description', '');\r\n $scope.securityOptions.deactivationReason = keyLookup($scope.appInfo.fuelCards.deactivateReasons, card.CardDeactRsn_Key, 'Description', '');\r\n $scope.securityOptions.embossingReason = keyLookup($scope.appInfo.fuelCards.embossingReasons, card.CardEmbRsn_Key, 'Description', '');\r\n $scope.securityOptions.alertRule = keyLookup($scope.appInfo.fuelCards.alertRules, card.CardAlertRule_Key, 'ID', '');\r\n\r\n //show the card detail screen\r\n $scope.appInfo.fuelCards.viewCards.shown = false;\r\n $scope.appInfo.fuelCards.modalEdit.shown = true;\r\n };\r\n })\r\n .controller(\"viewCardsSideMenuCtrl\", function ($scope, FuelCardsService, WebFunctions, reportingService, $filter)\r\n {\r\n 'use strict';\r\n $scope.cols = [];\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.viewCards) $scope.locationInfo.sideMenuData.viewCards = [];\r\n $scope.locationInfo.sideMenuData.viewCards.reportType = 'ViewCards';\r\n $scope.locationInfo.sideMenuData.viewCards.cardFormat = '0';\r\n $scope.locationInfo.sideMenuData.viewCards.cardNumber = '';\r\n $scope.locationInfo.sideMenuData.viewCards.active = 'True';\r\n $scope.locationInfo.sideMenuData.viewCards.expired = 'False';\r\n $scope.locationInfo.sideMenuData.viewCards.pending = 'False';\r\n $scope.locationInfo.sideMenuData.viewCards.locked = 'False';\r\n $scope.locationInfo.sideMenuData.viewCards.cancelled = 'False';\r\n $scope.$root.reportSettings.reportKey = 20;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.viewCards.cardFormat = $scope.reportSettings.loadOptions.cardFormat;\r\n $scope.locationInfo.sideMenuData.viewCards.cardNumber = $scope.reportSettings.loadOptions.cardNumber;\r\n $scope.locationInfo.sideMenuData.viewCards.active = $scope.reportSettings.loadOptions.active;\r\n $scope.locationInfo.sideMenuData.viewCards.expired = $scope.reportSettings.loadOptions.expired;\r\n $scope.locationInfo.sideMenuData.viewCards.pending = $scope.reportSettings.loadOptions.pending;\r\n $scope.locationInfo.sideMenuData.viewCards.locked = $scope.reportSettings.loadOptions.locked;\r\n $scope.locationInfo.sideMenuData.viewCards.cancelled = $scope.reportSettings.loadOptions.cancelled;\r\n $scope.locationInfo.sideMenuData.viewCards.department = $scope.reportSettings.loadOptions.department;\r\n $scope.locationInfo.sideMenuData.viewCards.template = $scope.reportSettings.loadOptions.template;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.cardFormat = $scope.locationInfo.sideMenuData.viewCards.cardFormat;\r\n $scope.reportSettings.saveOptions.cardNumber = $scope.locationInfo.sideMenuData.viewCards.cardNumber;\r\n $scope.reportSettings.saveOptions.active = $scope.locationInfo.sideMenuData.viewCards.active;\r\n $scope.reportSettings.saveOptions.expired = $scope.locationInfo.sideMenuData.viewCards.expired;\r\n $scope.reportSettings.saveOptions.pending = $scope.locationInfo.sideMenuData.viewCards.pending;\r\n $scope.reportSettings.saveOptions.locked = $scope.locationInfo.sideMenuData.viewCards.locked;\r\n $scope.reportSettings.saveOptions.cancelled = $scope.locationInfo.sideMenuData.viewCards.cancelled;\r\n $scope.reportSettings.saveOptions.department = $scope.locationInfo.sideMenuData.viewCards.department;\r\n $scope.reportSettings.saveOptions.template = $scope.locationInfo.sideMenuData.viewCards.template;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n var format = $scope.locationInfo.sideMenuData.viewCards.cardFormat === '' ? '0' :\r\n $scope.locationInfo.sideMenuData.viewCards.cardFormat;\r\n var active = $scope.locationInfo.sideMenuData.viewCards.active === \"True\" ? -1 : 0;\r\n var expired = $scope.locationInfo.sideMenuData.viewCards.expired === \"True\" ? -1 : 0;\r\n var pending = $scope.locationInfo.sideMenuData.viewCards.pending === \"True\" ? -1 : 0;\r\n var locked = $scope.locationInfo.sideMenuData.viewCards.locked === \"True\" ? -1 : 0;\r\n var cancelled = $scope.locationInfo.sideMenuData.viewCards.cancelled === \"True\" ? -1 : 0;\r\n var department = $scope.locationInfo.sideMenuData.viewCards.department === '' ? '0':\r\n $scope.locationInfo.sideMenuData.viewCards.department;\r\n\r\n var qs = \"reportName=\" + 'CustomerCardList' +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-CardFormatKey=\" + format +\r\n \"&RP-CardNumDesc=\" + $scope.locationInfo.sideMenuData.viewCards.cardNumber +\r\n \"&RP-IsActive=\" + active +\r\n \"&RP-IsExpired=\" + expired +\r\n \"&RP-IsPending=\" + pending +\r\n \"&RP-IsLocked=\" + locked +\r\n \"&RP-IsCancelled=\" + cancelled +\r\n \"&RP-Department=\" + department +\r\n \"&RP-Template=\" + $scope.locationInfo.sideMenuData.viewCards.template +\r\n \"&RP-CanViewCardNumbers=\" + $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers);\r\n\r\n reportingService.exportReport(qs, args.format);\r\n });\r\n })\r\n .controller(\"addCardsCtrl\", function ($scope, $compile, FuelCardsService, WebFunctions, $filter, validatorSvc, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.columns = [\r\n {\r\n field: \"description\",\r\n title: localStrings.getLocalizedString(\"CardDescription\"),\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"class\", \"k-input k-textbox\")\r\n .attr(\"maxlength\", 30)\r\n .prop('required', true)\r\n .attr(\"data-required-msg\", localStrings.getLocalizedString(\"Required\"))\r\n .appendTo(element);\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n },\r\n {\r\n field: \"number\",\r\n title: localStrings.getLocalizedString(\"CardNumber\"),\r\n width: 160,\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"maxlength\", $scope.context.maxCardNoLength)\r\n .prop('required', true)\r\n .attr(\"data-required-msg\", localStrings.getLocalizedString(\"Required\"))\r\n .appendTo(element)\r\n .kendoNumericTextBox({\r\n decimals: 0,\r\n format: \"#\",\r\n min: 0,\r\n spinners: false\r\n });\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n },\r\n {\r\n field: \"PIN\",\r\n title: localStrings.getLocalizedString(\"PIN\"),\r\n width: 120,\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"maxlength\", 16)\r\n .appendTo(element)\r\n .kendoNumericTextBox({\r\n decimals: 0,\r\n format: \"#\",\r\n min: 0,\r\n spinners: false\r\n });\r\n }\r\n },\r\n {\r\n field: \"vehicleID\",\r\n title: localStrings.getLocalizedString(\"VehicleID\"),\r\n width: 100,\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"class\", \"k-input k-textbox\")\r\n .attr(\"maxlength\", 20)\r\n .appendTo(element);\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n },\r\n {\r\n field: \"licenseNo\",\r\n title: localStrings.getLocalizedString(\"LicenseNo\"),\r\n width: 100,\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"class\", \"k-input k-textbox\")\r\n .attr(\"maxlength\", 15)\r\n .appendTo(element);\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n },\r\n {\r\n field: \"state\",\r\n title: localStrings.getLocalizedString(\"LicenseState\"),\r\n width: 60,\r\n template: \"#=state.Code#\",\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $scope.kendo.stateList = $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .appendTo(element)\r\n .kendoDropDownList({\r\n autoBind: false,\r\n dataSource: $scope.context.states,\r\n dataTextField: \"Code\",\r\n dataValueField: \"Key\",\r\n optionLabel: {\r\n Key: null,\r\n Code: \"\"\r\n }\r\n });\r\n }\r\n },\r\n {\r\n title: ' ',\r\n template: \"\",\r\n width: 50\r\n },\r\n {\r\n title: ' ',\r\n template: \"\",\r\n width: 50\r\n }\r\n ];\r\n $scope.kendo.addCardsGridOptions = {\r\n autoBind: true,\r\n columns: $scope.kendo.columns,\r\n dataSource: new kendo.data.DataSource({\r\n data: [],\r\n schema: {\r\n model: {\r\n id: \"description\",\r\n fields: {\r\n key: {\r\n type: \"number\",\r\n editable: false,\r\n nullable: false,\r\n validation: false\r\n },\r\n description: {\r\n type: \"string\",\r\n editable: true,\r\n nullable: true,\r\n validation: false\r\n },\r\n number: {\r\n type: \"number\",\r\n editable: true,\r\n nullable: true,\r\n validation: {\r\n unique: function (input)\r\n {\r\n if (input.attr(\"name\") === \"number\" && input.val() !== '')\r\n {\r\n var matches = $scope.kendo.addCardsGrid.dataSource.data().toJSON().findAll({number: input.val().toNumber()}) || [];\r\n input.attr(\"data-unique-msg\", localStrings.getLocalizedString(\"MustBeUnique\"));\r\n return matches.length <= 1;\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n },\r\n PIN: {\r\n type: \"number\",\r\n editable: true,\r\n nullable: true,\r\n validation: false\r\n },\r\n vehicleID: {\r\n type: \"string\",\r\n editable: true,\r\n nullable: true,\r\n validation: false\r\n },\r\n licenseNo: {\r\n type: \"string\",\r\n editable: true,\r\n nullable: true,\r\n validation: false\r\n }, state: {\r\n editable: true,\r\n defaultValue: {Key: null, Code: \"\"}\r\n }\r\n }\r\n }\r\n }\r\n }),\r\n editable: {\r\n mode: \"inline\",\r\n update: true,\r\n destroy: true,\r\n createAt: \"bottom\"\r\n },\r\n filterable: false,\r\n messages: {\r\n commands: {\r\n cancel: \"\",\r\n canceledit: \"\",\r\n create: \"\",\r\n destroy: \"\",\r\n edit: \"\",\r\n save: \"\",\r\n select: \"\",\r\n update: \"\"\r\n }\r\n },\r\n mobile: true,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: true,\r\n sortable: true\r\n };\r\n\r\n function addFooterBar()\r\n {\r\n var addCardAction = $('
    ').appendTo($('#addCardsGrid'));\r\n $compile(addCardAction)($scope);\r\n }\r\n\r\n $scope.$on(\"kendoWidgetCreated\", function (event, widget)\r\n {\r\n if (widget === $scope.kendo.addCardsGrid)\r\n {\r\n addFooterBar();\r\n\r\n $scope.kendo.addCardsGrid.table.on(\"keydown\", function (e)\r\n {\r\n if (e.keyCode === kendo.keys.TAB && e.target.closest(\"td\").getAttribute(\"data-container-for\") === \"state\")\r\n {\r\n $scope.addRow();\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $scope.kendo.addCardsGrid.tbody.on(\"click\", \"tr:not(.k-grid-edit-row)\", function (e)\r\n {\r\n $scope.kendo.addCardsGrid.editRow($scope.kendo.addCardsGrid.tbody.find(\"tr.k-state-selected\"));\r\n });\r\n }\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddNewCards) || !$scope.checkCurrentUserPermission(WebFunctions.EditCards))\r\n {\r\n $scope.goTo(\"/Home\");\r\n return;\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 40;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsCardsSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData)\r\n {\r\n $scope.locationInfo.sideMenuData = {};\r\n }\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n\r\n $scope.context = {\r\n template: {},\r\n format: {},\r\n showCardNo: false,\r\n showPIN: false,\r\n showVehInfo: false\r\n };\r\n\r\n FuelCardsService.getCardsContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (!data.Successful)\r\n {\r\n $scope.modalifier.showSetupError();\r\n return;\r\n }\r\n\r\n $scope.context.formats = data.CardFormats;\r\n $scope.context.states = data.States;\r\n $scope.context.templates = data.CustomerCardTemplates.sortBy('Description');\r\n\r\n validateTemplates();\r\n\r\n if ($scope.context.templates.length === 0)\r\n {\r\n var msg = $scope.checkCurrentUserPermission(WebFunctions.AddNewCards) ? ' ' + localStrings.getLocalizedString(\"CreateOneOr\") + ' ' : ' ';\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddCards\"), localStrings.getLocalizedString(\"NoCardTemplates\") + msg + localStrings.getLocalizedString(\"ContactAccountAdmin\"));\r\n $scope.context.templateKey = 0;\r\n }\r\n else\r\n $scope.context.templateKey = $scope.context.templates[0].Key;\r\n\r\n // Need to make sure the template details are loaded when the add cards page is loaded\r\n if ($scope.context.templateKey > 0) {\r\n $scope.getTemplate($scope.context.templateKey);\r\n }\r\n });\r\n };\r\n\r\n $scope.addRow = function ()\r\n {\r\n if ($scope.kendo.templateDropDown.value().isBlank())\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddCards\"), localStrings.getLocalizedString(\"ValidTemplateRequired\"));\r\n return;\r\n }\r\n\r\n $scope.kendo.addCardsGrid.saveChanges();\r\n $scope.kendo.addCardsGrid.addRow();\r\n };\r\n\r\n $scope.getTemplate = function (key)\r\n {\r\n if (!key)\r\n {\r\n return;\r\n }\r\n\r\n FuelCardsService.getCardDetails(key).then(\r\n function (data)\r\n {\r\n if (!data.Successful)\r\n {\r\n $scope.modalifier.showSetupError();\r\n return;\r\n }\r\n\r\n //store complete card object\r\n $scope.context.templateDetails = data.CardDetails;\r\n\r\n //get selected template and format\r\n $scope.context.template = $filter('filter')($scope.context.templates, {Key: key.toNumber()}, true)[0];\r\n $scope.context.format = $filter('filter')($scope.context.formats, {Key: $scope.context.templateDetails.CardInfos[0].CardFmt_Key}, true)[0];\r\n $scope.context.maxCardNoLength = $scope.context.format.Mask.match(/0/g).length || 20;\r\n\r\n $scope.kendo.addCardsGrid.cancelRow();\r\n var cols = $scope.kendo.columns.clone();\r\n\r\n if ($scope.context.template.PhysicalCard !== -1)\r\n cols.remove({field: 'number'});\r\n\r\n if ($scope.context.template.AllowPIN === -1)\r\n cols.remove({field: 'PIN'});\r\n\r\n if ($scope.context.format.AllowVehicleInfo === -1)\r\n {\r\n cols.remove({field: 'vehicleID'});\r\n cols.remove({field: 'licenseNo'});\r\n cols.remove({field: 'state'});\r\n }\r\n\r\n $scope.kendo.addCardsGrid.setOptions({\r\n columns: cols\r\n });\r\n\r\n addFooterBar();\r\n });\r\n };\r\n\r\n $scope.saveCards = function ()\r\n {\r\n $scope.kendo.addCardsGrid.saveChanges();\r\n\r\n if ($scope.kendo.addCardsGrid.tbody.find(\".k-invalid\").length > 0)\r\n return;\r\n\r\n var cards = $scope.kendo.addCardsGrid.dataSource.data();\r\n\r\n //make sure there is at least one card to save\r\n if (angular.isUndefinedOrNullOrEmpty(cards))\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoCardsToSave\"), 'error');\r\n return;\r\n }\r\n\r\n //process each card entry for save\r\n angular.forEach(\r\n cards,\r\n function (item)\r\n {\r\n //create a complete card record from the selected template and push to the DB\r\n var newCard = angular.copy($scope.context.templateDetails.CardInfos[0]);\r\n\r\n newCard.Cust_Key = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n newCard.Description = item.description;\r\n newCard.Number = item.number;\r\n newCard.PIN = item.PIN;\r\n newCard.Expiration_Date = $scope.context.template.SetExpirationDate;\r\n newCard.VehicleID = item.vehicleID;\r\n newCard.Vehicle_License_No = item.licenseNo;\r\n newCard.Vehicle_State_Key = item.state.Key;\r\n newCard.Template = 0;\r\n newCard.Status = newCard.CardFmt_Allow_Pending === '-1' ? '4' : '0';\r\n\r\n FuelCardsService.addCard(\r\n 4,\r\n newCard,\r\n $scope.context.templateDetails.CardCFs[0],\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey).then(\r\n function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (!data.CardNumberValid)\r\n //notify on failure\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"CardNumberUnique\"), 'error');\r\n }\r\n else\r\n {\r\n //remove saved cards\r\n var result = getCard();\r\n var i = cards.indexOf(result);\r\n cards.splice(i, 1);\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesSaved\"), \"success\");\r\n }\r\n }\r\n else\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"RecordNotSaved\"), 'error');\r\n }\r\n });\r\n\r\n //javascript closure to capture index and hold it until the promise returns\r\n /*jshint latedef: false */\r\n var getCard = (function ()\r\n {\r\n var myItem = item;\r\n return function ()\r\n {\r\n return myItem;\r\n };\r\n })();\r\n });\r\n };\r\n\r\n /*jshint latedef: false */\r\n var validateTemplates = function ()\r\n {\r\n for (var i = $scope.context.templates.length - 1; i >= 0; i--)\r\n {\r\n if ($scope.context.templates[i].PhysicalCard === -1 && !($scope.context.templates[i].AutoNoKey === -1 ||\r\n $scope.context.templates[i].AllowPending === -1))\r\n {\r\n $scope.context.templates.splice(i, 1);\r\n }\r\n }\r\n };\r\n\r\n })\r\n .controller(\"locationsCtrl\", function ($scope, FuelCardsService, customerService, validatorSvc, $filter, WebFunctions, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.kendo = {};\r\n $scope.kendo.locationsGrid = {};\r\n $scope.kendo.locationsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var selectedRows = this.select();\r\n var dataItem = this.dataItem(selectedRows[0]);\r\n $scope.selectLocation(dataItem);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"ID\",\r\n title: localStrings.getLocalizedString(\"ID\"),\r\n width: 100,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Description\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Address1\",\r\n title: localStrings.getLocalizedString(\"Address\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"City\",\r\n title: localStrings.getLocalizedString(\"City\"),\r\n width: 125,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"County\",\r\n title: localStrings.getLocalizedString(\"County\"),\r\n width: 125,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"State\",\r\n title: localStrings.getLocalizedString(\"StateProvince\"),\r\n width: 90,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"PostalCode\",\r\n title: localStrings.getLocalizedString(\"PostalCode\"),\r\n width: 90,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.locationsGridInit = function ()\r\n {\r\n $scope.kendo.locationsGridDS = new kendo.data.DataSource({\r\n data: $scope.appInfo.fuelCards.locations.results\r\n });\r\n\r\n $scope.kendo.locationsGridDS.read();\r\n $scope.kendo.locationsGrid.dataSource.data($scope.kendo.locationsGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.checkForAppliedProfile();\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 40;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsCardsSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n if (!$scope.appInfo.fuelCards.states)\r\n {\r\n FuelCardsService.getCardsContext(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey\r\n ).then(\r\n function (data)\r\n {\r\n $scope.appInfo.fuelCards.states = data.States;\r\n }\r\n );\r\n }\r\n $scope.appInfo.fuelCards.locations = {\r\n results: [],\r\n selected: {},\r\n disableCtrls: true,\r\n LocIDFormat: 1,\r\n LocIDLength: 10\r\n };\r\n\r\n $scope.canAddorSave = $scope.checkCurrentUserPermission(WebFunctions.ViewCards) && ($scope.checkCurrentUserPermission(WebFunctions.AddNewCards) ||\r\n $scope.checkCurrentUserPermission(WebFunctions.EditCards));\r\n\r\n validatorSvc.clearValidationScopes();\r\n\r\n if (!$scope.appInfo.fuelCards.states)\r\n {\r\n FuelCardsService.getCardsContext(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey\r\n ).then(\r\n function (data)\r\n {\r\n $scope.appInfo.fuelCards.states = data.States;\r\n $scope.appInfo.fuelCards.states.unshift({Key: 0, Name: ' '});\r\n $scope.pullLocations();\r\n }\r\n );\r\n }\r\n else\r\n $scope.pullLocations();\r\n $scope.predicate = 'ID';\r\n $scope.reverse = false;\r\n };\r\n\r\n $scope.addLocation = function ()\r\n {\r\n $scope.clearLocation();\r\n $scope.appInfo.fuelCards.locations.disableCtrls = false;\r\n };\r\n\r\n $scope.clearLocation = function ()\r\n {\r\n angular.copy(FuelCardsService.blankLocation, $scope.appInfo.fuelCards.locations.selected);\r\n $scope.appInfo.fuelCards.locations.disableCtrls = true;\r\n validatorSvc.clearAllValidations();\r\n };\r\n\r\n $scope.deleteLocation = function (location)\r\n {\r\n var yes = function ()\r\n {\r\n $scope.pushLocation(8, location);\r\n };\r\n\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"DeleteLocation\"), yes);\r\n };\r\n\r\n $scope.saveLocation = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n if ($scope.appInfo.fuelCards.locations.selected.Key === 0)\r\n {\r\n $scope.appInfo.fuelCards.locations.selected.CustKey = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n $scope.appInfo.fuelCards.locations.selected.Type = 2;\r\n $scope.pushLocation(4, $scope.appInfo.fuelCards.locations.selected);\r\n } else\r\n $scope.pushLocation(16, $scope.appInfo.fuelCards.locations.selected);\r\n };\r\n\r\n $scope.selectLocation = function (location)\r\n {\r\n $scope.clearLocation();\r\n angular.copy(location, $scope.appInfo.fuelCards.locations.selected);\r\n $scope.appInfo.fuelCards.locations.disableCtrls = !$scope.checkCurrentUserPermission(WebFunctions.EditCards);\r\n };\r\n\r\n $scope.pullLocations = function ()\r\n {\r\n customerService.getCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, 2)\r\n .then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.Locations.length > 0)\r\n {\r\n $scope.appInfo.fuelCards.locations.LocIDFormat = data.LocIDFormat || 0;\r\n $scope.appInfo.fuelCards.locations.LocIDLength = data.LocIDLength || 10;\r\n $scope.appInfo.fuelCards.locations.results = data.Locations\r\n .each(function (loc, i)\r\n {\r\n var state = $scope.appInfo.fuelCards.states.find({Key: loc.StateKey});\r\n loc.State = state ? state.Code : null;\r\n })\r\n .sortBy('Description');\r\n $scope.selectLocation($scope.appInfo.fuelCards.locations.results[0]);\r\n $scope.kendo.locationsGridInit();\r\n $scope.kendo.locationsGridInit();\r\n }\r\n else\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoResults\"), 'warning');\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n }\r\n );\r\n\r\n };\r\n\r\n $scope.pushLocation = function (status, location)\r\n {\r\n customerService.saveCustomerLocations(\r\n status,\r\n location,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n )\r\n .then(function (data)\r\n {\r\n $scope.clearLocation();\r\n $scope.pullLocations();\r\n $scope.resetDirtyFlags($scope.appInfo.fuelCards.locations.locationsForm);\r\n }\r\n );\r\n };\r\n\r\n $scope.updatePhone = function ()\r\n {\r\n $scope.appInfo.fuelCards.locations.selected.Phone = $scope.appInfo.fuelCards.locations.selected.PhoneFormatted.replace(/[^0-9]/g, '');\r\n };\r\n })\r\n .controller(\"departmentsCtrl\", function ($scope, $filter, $timeout, FuelCardsService, validatorSvc, WebFunctions, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.cols = [];\r\n $scope.kendo = {departmentsGridReady: false};\r\n $scope.kendo.departmentsGrid = {};\r\n $scope.kendo.departmentsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n $scope.selectRow(dataItem.deptKey);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"deptName\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"cell1Value\",\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"cell2Value\",\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"cell3Value\",\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"cell4Value\",\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"cell5Value\",\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n //height: $(document).height() - 375,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.departmentsGridInit = function ()\r\n {\r\n $scope.kendo.departmentsGridDS = new kendo.data.DataSource({\r\n data: $scope.tableArray\r\n });\r\n\r\n $scope.kendo.departmentsGridDS.read();\r\n $scope.kendo.departmentsGrid.dataSource.data($scope.kendo.departmentsGridDS.data());\r\n\r\n if ($scope.cols[0])\r\n $(\"#departmentsGrid th[data-field=cell1Value] a\").html($scope.cols[0].FieldName);\r\n else\r\n $scope.kendo.departmentsGrid.hideColumn(1);\r\n\r\n if ($scope.cols[1])\r\n $(\"#departmentsGrid th[data-field=cell2Value] a\").html($scope.cols[1].FieldName);\r\n else\r\n $scope.kendo.departmentsGrid.hideColumn(2);\r\n\r\n if ($scope.cols[2])\r\n $(\"#departmentsGrid th[data-field=cell3Value] a\").html($scope.cols[2].FieldName);\r\n else\r\n $scope.kendo.departmentsGrid.hideColumn(3);\r\n\r\n if ($scope.cols[3])\r\n $(\"#departmentsGrid th[data-field=cell4Value] a\").html($scope.cols[3].FieldName);\r\n else\r\n $scope.kendo.departmentsGrid.hideColumn(4);\r\n\r\n if ($scope.cols[4])\r\n $(\"#departmentsGrid th[data-field=cell5Value] a\").html($scope.cols[4].FieldName);\r\n else\r\n $scope.kendo.departmentsGrid.hideColumn(5);\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 40;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsCardsSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n $scope.departments = [];\r\n $scope.fields = [];\r\n $scope.values = [];\r\n $scope.selDept = {};\r\n $scope.selVals = [];\r\n $scope.disableControls = true;\r\n\r\n $scope.canAddorSave = $scope.checkCurrentUserPermission(WebFunctions.ViewCards) && ($scope.checkCurrentUserPermission(WebFunctions.AddNewCards) ||\r\n $scope.checkCurrentUserPermission(WebFunctions.EditCards));\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.pullDepartments();\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.tableArray))\r\n $scope.selectRow($scope.tableArray[0].deptKey);\r\n };\r\n\r\n $scope.createObjects = function (data)\r\n {\r\n $scope.display = {\r\n hideCol1: true,\r\n hideCol2: true,\r\n hideCol3: true,\r\n hideCol4: true,\r\n hideCol5: true,\r\n disableControls: true\r\n };\r\n\r\n if (data.Successful)\r\n {\r\n $scope.departments = data.Departments || [];\r\n $scope.fields = data.Fields || [];\r\n $scope.values = data.Values || [];\r\n\r\n if ($scope.departments.length === 0 && $scope.fields.length === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoResults\"), 'warning');\r\n }\r\n }\r\n else\r\n {\r\n $scope.modalifier.showSetupError();\r\n return;\r\n }\r\n\r\n //(rare) catch any empty field names and give them a default value\r\n angular.forEach($scope.fields, function (item)\r\n {\r\n if (item.Key > 0 && item.FieldName.isBlank())\r\n item.FieldName = localStrings.getLocalizedString(\"DeptField\") + ' ' + item.FieldNumber;\r\n });\r\n\r\n // No depts defined, create empty binding objs\r\n if ($scope.departments.length === 0)\r\n {\r\n $scope.selDept = {\r\n \"CustKey\": $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n \"Description\": \"\",\r\n \"Key\": 0,\r\n \"TimeStamp\": \"\"\r\n };\r\n\r\n // create a blank value obj for any defined fields\r\n angular.forEach($scope.fields, function (field)\r\n {\r\n $scope.selVals.push({\r\n \"CardDptFldKey\": field.Key,\r\n \"CardDptKey\": 0,\r\n \"FieldValue\": \"\",\r\n \"Key\": 0,\r\n \"TimeStamp\": \"\"\r\n });\r\n });\r\n }\r\n else\r\n // depts exist, create any needed empty values for fields not previously defined\r\n {\r\n var temp = {};\r\n angular.forEach($scope.departments, function (dept)\r\n {\r\n angular.forEach($scope.fields, function (field)\r\n {\r\n temp = ($filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: field.Key\r\n }));\r\n if (temp.length === 0)\r\n {\r\n $scope.values.push({\r\n \"CardDptFldKey\": field.Key,\r\n \"CardDptKey\": dept.Key,\r\n \"FieldValue\": \"\",\r\n \"Key\": 0,\r\n \"TimeStamp\": \"\"\r\n });\r\n }\r\n });\r\n });\r\n }\r\n\r\n if ($scope.departments.length > 0 && $scope.fields.length > 0)\r\n $scope.makeTable();\r\n\r\n if ($scope.departments.length > 0 && $scope.fields.length === 0)\r\n $scope.loadTable();\r\n\r\n if ($scope.departments.length === 0)\r\n $scope.tableArray = [];\r\n\r\n validatorSvc.clearAllValidations();\r\n\r\n $scope.kendo.departmentsGridInit();\r\n };\r\n\r\n $scope.deleteDept = function ()\r\n {\r\n var yes = function ()\r\n {\r\n $scope.pushDepartments(8);\r\n };\r\n\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"DeleteDepartment\"), yes);\r\n };\r\n\r\n $scope.pullDepartments = function ()\r\n {\r\n FuelCardsService.getCardsDepartments($scope.appInfo.webUser.CurrentAuthorization.CustKey)\r\n .then(function (data)\r\n {\r\n $scope.createObjects(data);\r\n $scope.resetDirtyFlags($scope.departmentForm);\r\n }\r\n );\r\n };\r\n\r\n $scope.pushDepartments = function (recStatus)\r\n {\r\n if (recStatus !== 8 && !validatorSvc.executeValidations())\r\n return;\r\n\r\n if (angular.isUndefinedOrNullOrEmpty(recStatus))\r\n recStatus = $scope.selDept.Key === 0 ? 4 : 16;\r\n\r\n $scope.selDept.Description = $scope.selDept.newDesc;\r\n\r\n FuelCardsService.saveCardsDepartments(\r\n recStatus,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n [$scope.selDept],\r\n null,\r\n $scope.selVals,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n )\r\n .then(function (data)\r\n {\r\n $scope.selDept = {};\r\n $scope.selVals = [];\r\n $scope.display.disableControls = true;\r\n $scope.createObjects(data);\r\n $scope.resetDirtyFlags($scope.departmentForm);\r\n }\r\n );\r\n\r\n $scope.selDept = {};\r\n $scope.selVals = [];\r\n $scope.display.disableControls = true;\r\n\r\n };\r\n\r\n $scope.addRow = function ()\r\n {\r\n $scope.display.disableControls = !$scope.canAddorSave;\r\n $scope.selDept = {\r\n CustKey: $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n Description: \"\",\r\n Key: 0,\r\n TimeStamp: ''\r\n };\r\n\r\n $scope.selVals = [];\r\n\r\n angular.forEach($scope.fields, function (item)\r\n {\r\n $scope.selVals.push({\r\n CardDptFldKey: item.Key,\r\n CardDptKey: 0,\r\n FieldValue: '',\r\n Key: 0,\r\n TimeStamp: ''\r\n });\r\n });\r\n\r\n $scope.setFocusOnReady(\"#fc-dept-description\");\r\n };\r\n\r\n $scope.selectRow = function (key)\r\n {\r\n validatorSvc.clearAllValidations();\r\n var dept = $filter('filter')($scope.departments, {Key: key}, true)[0];\r\n $scope.selDept = dept;\r\n $scope.selDept.newDesc = dept.Description;\r\n $scope.selVals = $scope.values.findAll({CardDptKey: dept.Key}).sortBy(function (n)\r\n {\r\n return $scope.fields.find({Key: n.CardDptFldKey}).FieldNumber;\r\n });\r\n $scope.display.disableControls = !$scope.canAddorSave;\r\n\r\n $scope.setFocusOnReady(\"#fc-dept-description\");\r\n };\r\n\r\n $scope.makeTable = function ()\r\n {\r\n $scope.tableArray = [];\r\n\r\n //get columns into the righ torder\r\n $scope.cols = $filter('orderBy')($scope.fields, 'FieldNumber');\r\n\r\n angular.forEach($scope.departments, function (dept)\r\n {\r\n var row = {};\r\n row.deptKey = dept.Key;\r\n row.deptName = dept.Description;\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.cols[0]))\r\n {\r\n var cell1 = $filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: $scope.cols[0].Key\r\n })[0];\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty(cell1))\r\n {\r\n row.cell1Key = cell1.Key;\r\n row.cell1Value = cell1.FieldValue;\r\n $scope.display.hideCol1 = false;\r\n }\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.cols[1]))\r\n {\r\n var cell2 = $filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: $scope.cols[1].Key\r\n })[0];\r\n if (!angular.isUndefinedOrNullOrEmpty(cell2))\r\n {\r\n row.cell2Key = cell2.Key;\r\n row.cell2Value = cell2.FieldValue;\r\n $scope.display.hideCol2 = false;\r\n }\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.cols[2]))\r\n {\r\n var cell3 = $filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: $scope.cols[2].Key\r\n })[0];\r\n if (!angular.isUndefinedOrNullOrEmpty(cell3))\r\n {\r\n row.cell3Key = cell3.Key;\r\n row.cell3Value = cell3.FieldValue;\r\n $scope.display.hideCol3 = false;\r\n }\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.cols[3]))\r\n {\r\n var cell4 = $filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: $scope.cols[3].Key\r\n })[0];\r\n if (!angular.isUndefinedOrNullOrEmpty(cell4))\r\n {\r\n row.cell4Key = cell4.Key;\r\n row.cell4Value = cell4.FieldValue;\r\n $scope.display.hideCol4 = false;\r\n }\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.cols[4]))\r\n {\r\n var cell5 = $filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: $scope.cols[4].Key\r\n })[0];\r\n if (!angular.isUndefinedOrNullOrEmpty(cell5))\r\n {\r\n row.cell5Key = cell5.Key;\r\n row.cell5Value = cell5.FieldValue;\r\n $scope.display.hideCol5 = false;\r\n }\r\n }\r\n\r\n $scope.tableArray.push(row);\r\n });\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.tableArray))\r\n $scope.tableArray = $filter('orderBy')($scope.tableArray, 'department');\r\n };\r\n\r\n $scope.loadTable = function ()\r\n {\r\n $scope.tableArray = [];\r\n angular.forEach($scope.departments, function (dept)\r\n {\r\n $scope.tableArray.push({deptKey: dept.Key, deptName: dept.Description});\r\n });\r\n };\r\n })\r\n .controller(\"departmentSetupCtrl\", function ($scope, FuelCardsService, validatorSvc, $filter, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n\r\n $scope.initialize = function ()\r\n {\r\n\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 40;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsCardsSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"4\";\r\n\r\n $scope.formDisabled = $scope.checkCurrentUserPermission(WebFunctions.ViewCards) && !($scope.checkCurrentUserPermission(WebFunctions.AddNewCards) ||\r\n $scope.checkCurrentUserPermission(WebFunctions.EditCards));\r\n validatorSvc.clearValidationScopes();\r\n $scope.pullFields();\r\n };\r\n\r\n $scope.setFields = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n $scope.fields = [{}, {}, {}, {}, {}];\r\n for (var index = 0; index < 5; ++index)\r\n {\r\n var match = $filter('filter')($scope.results, {FieldNumber: index + 1})[0];\r\n if (angular.isUndefinedOrNullOrEmpty(match))\r\n {\r\n $scope.fields[index] = {\r\n \"CustKey\": $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n \"FieldName\": \"\",\r\n \"FieldNumber\": index + 1,\r\n \"Key\": 0,\r\n \"TimeStamp\": \"\"\r\n };\r\n }\r\n else\r\n {\r\n $scope.fields[index] = match;\r\n }\r\n }\r\n\r\n $scope.setFocusOnReady(\"#fc-deptSU-content input:first\");\r\n };\r\n\r\n $scope.clickCancel = function ()\r\n {\r\n $scope.setFields();\r\n };\r\n\r\n $scope.clickSave = function ()\r\n {\r\n //fire off validations\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n //remove any empty records\r\n for (var i = $scope.fields.length - 1; i >= 0; i--)\r\n {\r\n if ($scope.fields[i].Key === 0 && $scope.fields[i].FieldName === '')\r\n $scope.fields.splice(i, 1);\r\n }\r\n\r\n //save the fields\r\n $scope.pushFields();\r\n };\r\n\r\n $scope.pullFields = function ()\r\n {\r\n FuelCardsService.getCardsDepartments($scope.appInfo.webUser.CurrentAuthorization.CustKey)\r\n .then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n $scope.results = data.Fields || [];\r\n }\r\n else\r\n {\r\n $scope.modalifier.showSetupError();\r\n $scope.results = [];\r\n }\r\n $scope.setFields();\r\n }\r\n );\r\n\r\n };\r\n\r\n $scope.pushFields = function ()\r\n {\r\n FuelCardsService.saveCardsDepartments(\r\n 5,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n null,\r\n $scope.fields,\r\n null,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n )\r\n .then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.Successful)\r\n {\r\n $scope.results = data.Fields || [];\r\n $scope.resetDirtyFlags($scope.deptSetupForm);\r\n }\r\n else\r\n {\r\n $scope.results = [];\r\n }\r\n $scope.setFields();\r\n }\r\n }\r\n );\r\n };\r\n });","/**\r\n * Created by jvitoria on 9/5/14.\r\n */\r\nangular.module(\"pnFuelCardsTransactions\", ['core.objects'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/FuelCards/Transactions/TransactionDetails\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionDetails\"),\r\n controller: \"transactionDetailsCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TransactionSummary\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionSummary\"),\r\n controller: \"transactionSummaryCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TransactionByInvoice\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionByInvoice\"),\r\n controller: \"transactionByInvoiceCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TransactionTaxRecap\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionTaxRecap\"),\r\n controller: \"transactionTaxRecapCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TaxDetails\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TaxDetails\"),\r\n controller: \"taxDetailsCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TaxSummary\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TaxSummary\"),\r\n controller: \"taxSummaryCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TransactionAlerts\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionAlerts\"),\r\n controller: \"transactionsAlertsCtrl\"\r\n });\r\n })\r\n\r\n .controller('fuelCardsTransactionsSideMenuCtrl', function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.appInfo.fuelCards)\r\n $scope.appInfo.fuelCards = {};\r\n if (!$scope.appInfo.fuelCards)\r\n $scope.appInfo.fuelCards.transactionAlerts = {};\r\n };\r\n })\r\n\r\n .controller(\"transactionDetailsCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"0\";\r\n };\r\n })\r\n\r\n .controller(\"transactionDetailsSideMenuCtrl\", function ($scope, validatorSvc, reportingService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.$root.reportSettings.reportKey = 22;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"0\",\r\n transactionDetails: {\r\n cardNoDesc: '',\r\n inclUnbilled: true,\r\n inclBilled: false,\r\n groupBy: \"0\",\r\n inclAdditionalInfo: false,\r\n viewCardNumbers: $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers) || false\r\n }\r\n };\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.transactionDetails = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.transactionDetails;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = 'CardTransactionDetails';\r\n var additionalInfoReportName = $scope.appInfo.webUser.CurrentAuthorization.Customer.CPInvcRecapSumTaxesByInvcGrp ? 'CardTransactionDetailsByTaxInvGroups' : 'CardTransactionDetailsIAD';\r\n rptName = $scope.locationInfo.sideMenuData.transactionDetails.inclAdditionalInfo ? additionalInfoReportName : rptName;\r\n\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-CardNoDesc=\" + $scope.locationInfo.sideMenuData.transactionDetails.cardNoDesc +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-InclBilled=\" + $scope.locationInfo.sideMenuData.transactionDetails.inclBilled +\r\n \"&RP-InclUnbilled=\" + $scope.locationInfo.sideMenuData.transactionDetails.inclUnbilled +\r\n \"&RP-GroupBy=\" + $scope.locationInfo.sideMenuData.transactionDetails.groupBy +\r\n \"&RP-ViewCardNumbers=\" + $scope.locationInfo.sideMenuData.transactionDetails.viewCardNumbers;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n\r\n $scope.updateOptions = function ()\r\n {\r\n if ($scope.locationInfo.sideMenuData.transactionDetails.inclUnbilled === false && $scope.locationInfo.sideMenuData.transactionDetails.inclBilled === false)\r\n {\r\n $scope.locationInfo.sideMenuData.transactionDetails.inclUnbilled = true;\r\n }\r\n };\r\n })\r\n\r\n .controller(\"transactionSummaryCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n };\r\n })\r\n\r\n .controller(\"transactionSummarySideMenuCtrl\", function ($scope, validatorSvc, reportingService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.$root.reportSettings.reportKey = 23;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"1\",\r\n transactionSummary: {\r\n cardNoDesc: '',\r\n invoiceNo: '',\r\n inclUnbilled: true,\r\n enableUnbilled: true,\r\n inclBilled: true,\r\n enableBilled: true,\r\n recap1: 4,\r\n recap2: 0\r\n }\r\n };\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.transactionSummary = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n $scope.updateOptions();\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.transactionSummary;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var qs = \"reportName=\" + 'CardTransactionSummary' +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-CardNoDesc=\" + $scope.locationInfo.sideMenuData.transactionSummary.cardNoDesc +\r\n \"&RP-InvoiceNo=\" + $scope.locationInfo.sideMenuData.transactionSummary.invoiceNo +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-InclBilled=\" + $scope.locationInfo.sideMenuData.transactionSummary.inclBilled +\r\n \"&RP-InclUnbilled=\" + $scope.locationInfo.sideMenuData.transactionSummary.inclUnbilled +\r\n \"&RP-Recap1=\" + $scope.locationInfo.sideMenuData.transactionSummary.recap1 +\r\n \"&RP-Recap2=\" + $scope.locationInfo.sideMenuData.transactionSummary.recap2 +\r\n \"&RP-ViewCardNumbers=\" + $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers) || false;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n\r\n $scope.updateOptions = function ()\r\n {\r\n if ($scope.locationInfo.sideMenuData.transactionSummary.invoiceNo === '')\r\n {\r\n $scope.locationInfo.sideMenuData.transactionSummary.enableUnbilled = true;\r\n $scope.locationInfo.sideMenuData.transactionSummary.enableBilled = true;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.transactionSummary.inclUnbilled = false;\r\n $scope.locationInfo.sideMenuData.transactionSummary.inclBilled = true;\r\n $scope.locationInfo.sideMenuData.transactionSummary.enableUnbilled = false;\r\n $scope.locationInfo.sideMenuData.transactionSummary.enableBilled = false;\r\n }\r\n\r\n if ($scope.locationInfo.sideMenuData.transactionSummary.inclUnbilled === false && $scope.locationInfo.sideMenuData.transactionSummary.inclBilled === false)\r\n {\r\n $scope.locationInfo.sideMenuData.transactionSummary.inclUnbilled = true;\r\n }\r\n };\r\n })\r\n\r\n .controller(\"transactionByInvoiceCtrl\", function ($scope, validatorSvc, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n validatorSvc.clearValidationScopes();\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n };\r\n })\r\n\r\n .controller(\"transactionByInvoiceSideMenuCtrl\", function ($scope, reportingService, WebFunctions, validatorSvc)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.$root.reportSettings.reportKey = 24;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"2\",\r\n transactionByInvoice: {\r\n invoiceNo: '',\r\n groupBy: 0,\r\n inclAdditionalInfo: false\r\n }\r\n };\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.transactionByInvoice = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.transactionByInvoice;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = 'CardTransactionsByInvoice';\r\n var additionalInfoReportName = $scope.appInfo.webUser.CurrentAuthorization.Customer.CPInvcRecapSumTaxesByInvcGrp ? 'CardTransactionsByInvoiceWithTaxInvGroups' : 'CardTransactionsByInvoiceIAD';\r\n rptName = $scope.locationInfo.sideMenuData.transactionByInvoice.inclAdditionalInfo ? additionalInfoReportName : rptName;\r\n\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-InvoiceNo=\" + $scope.locationInfo.sideMenuData.transactionByInvoice.invoiceNo +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-GroupBy=\" + $scope.locationInfo.sideMenuData.transactionByInvoice.groupBy +\r\n \"&RP-ViewCardNumbers=\" + $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers) || false;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n\r\n .controller(\"taxDetailsCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n };\r\n })\r\n\r\n .controller(\"taxDetailsSideMenuCtrl\", function ($scope, validatorSvc, reportingService, FuelCardsService, WebFunctions, localizationSvc)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"FuelCardsTransactionsLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n\r\n validatorSvc.clearValidationScopes();\r\n FuelCardsService.getTaxAuthorities(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey\r\n ).then(\r\n function (data)\r\n {\r\n $scope.appInfo.fuelCards.taxAuthorities = data.TaxAuthorities;\r\n $scope.appInfo.fuelCards.taxAuthorities.unshift({ Key: 0, Description: localStrings.getLocalizedString(\"None\") });\r\n\r\n $scope.$root.reportSettings.reportKey = 25;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"3\",\r\n taxDetails: {\r\n invoiceNo: '',\r\n taxAuthKey: '0',\r\n groupBy1: 1,\r\n enableGroupBy1None: true,\r\n groupBy2: 0,\r\n enableGroupBy2: true,\r\n groupBy3: 0,\r\n enableGroupBy3: false,\r\n inclTransDetail: true,\r\n inclAdditionalInfo: false,\r\n enableInclAdditionalInfo: true\r\n }\r\n };\r\n \r\n }\r\n );\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n $scope.updateOptions();\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.taxDetails;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = 'CardTaxDetails';\r\n rptName += $scope.locationInfo.sideMenuData.taxDetails.inclTransDetail ? 'IT' : 'NT';\r\n rptName = $scope.locationInfo.sideMenuData.taxDetails.inclAdditionalInfo ? 'CardTaxDetailsIAD' : rptName;\r\n\r\n var taxAuthKey = $scope.locationInfo.sideMenuData.taxDetails.taxAuthKey ? $scope.locationInfo.sideMenuData.taxDetails.taxAuthKey : '0';\r\n\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-InvoiceNo=\" + $scope.locationInfo.sideMenuData.taxDetails.invoiceNo +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-TaxAuthKey=\" + taxAuthKey +\r\n \"&RP-GroupBy1=\" + $scope.locationInfo.sideMenuData.taxDetails.groupBy1 +\r\n \"&RP-GroupBy2=\" + $scope.locationInfo.sideMenuData.taxDetails.groupBy2 +\r\n \"&RP-GroupBy3=\" + $scope.locationInfo.sideMenuData.taxDetails.groupBy3;\r\n \r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n\r\n $scope.updateOptions = function ()\r\n {\r\n if ($scope.locationInfo.sideMenuData.taxDetails.inclTransDetail === true)\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.enableInclAdditionalInfo = true;\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy1None = true;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.enableInclAdditionalInfo = false;\r\n $scope.locationInfo.sideMenuData.taxDetails.inclAdditionalInfo = false;\r\n if ($scope.locationInfo.sideMenuData.taxDetails.groupBy1 === \"0\")\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.groupBy1 = \"1\";\r\n $scope.notifier.show(localStrings.getLocalizedString(\"IncludeTransactionDetailsWarning\"), 'warning');\r\n }\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy1None = false;\r\n }\r\n\r\n if ($scope.locationInfo.sideMenuData.taxDetails.groupBy1 === \"0\")\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.groupBy2 = \"0\";\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy2 = false;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy2 = true;\r\n }\r\n\r\n if ($scope.locationInfo.sideMenuData.taxDetails.groupBy2 === \"0\")\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.groupBy3 = \"0\";\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy3 = false;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy3 = true;\r\n }\r\n };\r\n })\r\n\r\n .controller(\"taxSummaryCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"4\";\r\n };\r\n })\r\n\r\n .controller(\"taxSummarySideMenuCtrl\", function ($scope, validatorSvc, reportingService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.$root.reportSettings.reportKey = 26;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"4\",\r\n taxSummary: {\r\n invoiceNo: '',\r\n groupBy1: \"1\",\r\n groupBy2: \"0\",\r\n groupBy3: \"0\",\r\n enableGroupBy2: true,\r\n enableGroupBy3: false\r\n }\r\n };\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.taxSummary = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n $scope.updateOptions();\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.taxSummary;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = 'CardTaxSummary';\r\n rptName = $scope.appInfo.webUser.CurrentAuthorization.Customer.CPInvcRecapSumTaxesByInvcGrp ? 'CardTaxSummaryByTaxInvGroups' : rptName;\r\n\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-InvoiceNo=\" + $scope.locationInfo.sideMenuData.taxSummary.invoiceNo +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-GroupBy1=\" + $scope.locationInfo.sideMenuData.taxSummary.groupBy1 +\r\n \"&RP-GroupBy2=\" + $scope.locationInfo.sideMenuData.taxSummary.groupBy2 +\r\n \"&RP-GroupBy3=\" + $scope.locationInfo.sideMenuData.taxSummary.groupBy3;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n\r\n $scope.updateOptions = function ()\r\n {\r\n if ($scope.locationInfo.sideMenuData.taxSummary.groupBy1 === \"0\")\r\n {\r\n $scope.locationInfo.sideMenuData.taxSummary.groupBy2 = \"0\";\r\n $scope.locationInfo.sideMenuData.taxSummary.enableGroupBy2 = false;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.taxSummary.enableGroupBy2 = true;\r\n }\r\n\r\n if ($scope.locationInfo.sideMenuData.taxSummary.groupBy2 === \"0\")\r\n {\r\n $scope.locationInfo.sideMenuData.taxSummary.groupBy3 = \"0\";\r\n $scope.locationInfo.sideMenuData.taxSummary.enableGroupBy3 = false;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.taxSummary.enableGroupBy3 = true;\r\n }\r\n };\r\n })\r\n\r\n .controller(\"transactionsAlertsCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"6\";\r\n };\r\n })\r\n\r\n .controller(\"transactionsAlertsSideMenuCtrl\", function ($scope, validatorSvc, reportingService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.transactionsAlerts) $scope.locationInfo.sideMenuData.transactionsAlerts = {};\r\n $scope.locationInfo.sideMenuData.transactionsAlerts.reportType = 'fuelCardsTransactionsAlerts';\r\n $scope.locationInfo.sideMenuData.transactionsAlerts.reportCount = '10';\r\n $scope.$root.reportSettings.reportKey = 28;\r\n };\r\n\r\n $scope.refreshTransactionAlerts = function ()\r\n {\r\n $scope.appInfo.fuelCards.transactionAlerts = {};\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.transactionsAlerts = $scope.reportSettings.loadOptions.controls;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.transactionsAlerts;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var qs = \"reportName=CPAlertReportsArchive\" +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-NumberToReturn=\" + $scope.locationInfo.sideMenuData.transactionsAlerts.reportCount;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n\r\n .controller(\"transactionTaxRecapCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"7\";\r\n };\r\n })\r\n\r\n .controller(\"transactionTaxRecapSideMenuCtrl\", function ($scope, validatorSvc, reportingService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.kendo = {};\r\n $scope.$root.reportSettings.reportKey = 34;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"7\",\r\n transactionTaxRecap: {\r\n cardNoDesc: '',\r\n inclUnbilled: true,\r\n enableUnbilled: true,\r\n inclBilled: true,\r\n enableBilled: true,\r\n groupBy: 0,\r\n recap1: 0,\r\n recap2: 0,\r\n showTaxRecap: false\r\n }\r\n };\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.transactionTaxRecap = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n $scope.updateOptions();\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.transactionTaxRecap;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = \r\n $scope.appInfo.webUser.CurrentAuthorization.Customer.CPInvcRecapSumTaxesByInvcGrp ? 'CardTransactionwithTaxRecapsAndTaxInvoiceGroups' : 'CardTransactionwithTaxRecaps';\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-CardNoDesc=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.cardNoDesc +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-InclBilled=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.inclBilled +\r\n \"&RP-InclUnbilled=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.inclUnbilled +\r\n \"&RP-GroupBy=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.groupBy +\r\n \"&RP-RecapBy1=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.recap1 +\r\n \"&RP-RecapBy2=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.recap2 +\r\n \"&RP-ShowTaxRecapByGroupBy=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.showTaxRecap;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n\r\n $scope.updateOptions = function ()\r\n {\r\n if ($scope.locationInfo.sideMenuData.transactionTaxRecap.inclUnbilled === false && $scope.locationInfo.sideMenuData.transactionTaxRecap.inclBilled === false)\r\n {\r\n $scope.locationInfo.sideMenuData.transactionTaxRecap.inclUnbilled = true;\r\n }\r\n };\r\n });","/**\r\n * Created by jvitoria on 9/5/14.\r\n */\r\nangular.module(\"pnFuelCardsPrices\", ['core.objects'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/FuelCards/Prices/LookupPrices\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"LookupPrices\"),\r\n controller: \"pricesLookupCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsPricesLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Prices/PriceNoticeSettings\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PriceNoticeSettings\"),\r\n controller: \"priceNoticeSettingsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsPricesLocalization\");\r\n }\r\n }\r\n });\r\n })\r\n\r\n .controller('fuelCardsPricesSideMenuCtrl', function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n };\r\n })\r\n\r\n .controller(\"pricesLookupCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CPPriceNotices))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 42;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsPricesSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"0\";\r\n };\r\n })\r\n\r\n .controller(\"pricesLookupSideMenuCtrl\", function ($scope, $filter, FuelCardsService, reportingService, localizationSvc, $timeout)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"FuelCardsPricesLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n\r\n // instantiate variables\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.lookupPrices = {\r\n reportType: 'PricesLookup',\r\n site: 0,\r\n product: 0,\r\n groupBy: 4\r\n };\r\n $scope.context = {\r\n sites: [{ CustContCPSite_Site_Key: 0, Site_Description: localStrings.getLocalizedString(\"Any\") }],\r\n products: [{ ProdAliasGrp_Key: 0, ProdAliasGrp_Description: localStrings.getLocalizedString(\"Any\") }],\r\n maxCPDays: 7\r\n };\r\n\r\n //set save / load settings parameter\r\n $scope.$root.reportSettings.reportKey = 30;\r\n\r\n //get context data for drop-downs\r\n FuelCardsService.getPriceNoticesSettings(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.Customer.CPPrcNtcRuleKey).then(\r\n function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.PriceNoticesSettingsSites.length > 0)\r\n {\r\n $scope.context.sites = $scope.context.sites.concat($filter('filter')(data.PriceNoticesSettingsSites, {Site_Selected: '-1'}));\r\n $scope.context.sites = $filter('orderBy')($scope.context.sites, 'Site_Description');\r\n }\r\n else\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoSitesConfigured\"), 'warning');\r\n }\r\n\r\n if (data.PriceNoticesSettingsGroups.length > 0)\r\n {\r\n //pull All Products record from the array and handle separately\r\n data.PriceNoticesSettingsGroups.splice(0, 1);\r\n\r\n $scope.context.products = $scope.context.products.concat($filter('filter')(data.PriceNoticesSettingsGroups, {ProdAliasGrp_Selected: '-1'}));\r\n $scope.context.products = $filter('orderBy')($scope.context.products, 'ProdAliasGrp_Description');\r\n }\r\n else\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoProductsConfigured\"), 'warning');\r\n }\r\n\r\n $scope.context.maxCPDays = data.CPPriceRuleMaxDays;\r\n }\r\n else\r\n $scope.notifier.show(localStrings.getLocalizedString(\"FailedLoadContextualData\"), 'error');\r\n }\r\n );\r\n\r\n //Override default date selector options\r\n $scope.dateSelector.selection = 13;\r\n $scope.dateSelector.maxNumOfDays = $scope.context.maxCPDays || 7;\r\n $scope.dateSelector.overrideDefaults = true;\r\n $timeout(function () {\r\n $scope.dateSelector.options = [\r\n { name: localStrings.getLocalizedString(\"AllDays\"), value: 13 },\r\n { name: localStrings.getLocalizedString(\"Today\"), value: 0 },\r\n { name: localStrings.getLocalizedString(\"Yesterday\"), value: 1 },\r\n { name: localStrings.getLocalizedString(\"Tomorrow\"), value: 2 },\r\n { name: localStrings.getLocalizedString(\"LastSevenDays\"), value: 9 },\r\n { name: localStrings.getLocalizedString(\"SelectDays\"), value: 12 }];\r\n }, 0);\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.lookupPrices = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.lookupPrices;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n // Notify the user their date selection exceeds the configured limit\r\n var maxCPDays = [$scope.context.maxCPDays];\r\n if ((Date.parse($scope.dateSelector.endDate) - Date.parse($scope.dateSelector.startDate)) > ($scope.context.maxCPDays * 86400000))\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"PricingLimitedTo\", maxCPDays), 'warning');\r\n $scope.dateSelector.numOfDays = $scope.context.maxCPDays;\r\n }\r\n\r\n var qs = \"reportName=\" + 'CPPriceNotices' +\r\n \"&RP-CustContKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustContKey +\r\n \"&RP-FromDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-ThruDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-SiteKey=\" + $scope.locationInfo.sideMenuData.lookupPrices.site +\r\n \"&RP-ProductKey=\" + $scope.locationInfo.sideMenuData.lookupPrices.product +\r\n \"&RP-GroupBy=\" + $scope.locationInfo.sideMenuData.lookupPrices.groupBy;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n\r\n .controller(\"priceNoticeSettingsCtrl\", function ($scope, FuelCardsService, WebFunctions, $filter, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.kendo = {};\r\n $scope.kendo.productsGrid = {};\r\n $scope.kendo.productsGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"ProdAliasGrp_Selected\",\r\n title: localStrings.getLocalizedString(\"Select\"),\r\n width: 70,\r\n attributes: {class: \"alignCenter\"},\r\n filterable: false,\r\n template: \"\"\r\n },\r\n {\r\n field: \"ProdAliasGrp_Description\",\r\n title: localStrings.getLocalizedString(\"Product\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n }\r\n ],\r\n dataSource: [],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n $scope.kendo.sitesGrid = {};\r\n $scope.kendo.sitesGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"Site_Description\",\r\n title: localStrings.getLocalizedString(\"SiteDescription\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_Address1\",\r\n title: localStrings.getLocalizedString(\"Address\"),\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_City\",\r\n title: localStrings.getLocalizedString(\"City\"),\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"State_Code\",\r\n title: localStrings.getLocalizedString(\"State\"),\r\n width: 60,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_Zip\",\r\n title: localStrings.getLocalizedString(\"Zip\"),\r\n width: 60,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: [],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n $scope.kendo.siteSearchGrid = {};\r\n $scope.kendo.siteSearchGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"ProdAliasGrp_Selected\",\r\n title: localStrings.getLocalizedString(\"Select\"),\r\n width: 70,\r\n attributes: {class: \"alignCenter\"},\r\n filterable: false,\r\n template: \"\"\r\n },\r\n {\r\n field: \"Site_Description\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_Address1\",\r\n title: localStrings.getLocalizedString(\"Address\"),\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_City\",\r\n title: localStrings.getLocalizedString(\"City\"),\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"State_Code\",\r\n title: localStrings.getLocalizedString(\"State\"),\r\n width: 60,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_Zip\",\r\n title: localStrings.getLocalizedString(\"Zip\"),\r\n width: 60,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: true,\r\n selectable: \"row\",\r\n sortable: true,\r\n height:250 \r\n };\r\n\r\n $scope.kendo.siteSearchGridInit = function (ds)\r\n {\r\n $scope.kendo.siteSearchGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.siteSearchGridDS.read();\r\n $scope.kendo.siteSearchGrid.dataSource.data($scope.kendo.siteSearchGridDS.data());\r\n };\r\n\r\n $scope.kendo.sitesGridInit = function (ds)\r\n {\r\n $scope.kendo.sitesGridDS = new kendo.data.DataSource({\r\n data: ds,\r\n schema: {\r\n model: {\r\n fields: {\r\n Site_Description: {\r\n editable: false\r\n },\r\n Site_Address1: {\r\n editable: false\r\n },\r\n Site_City: {\r\n editable: false\r\n },\r\n State_Code: {\r\n editable: false\r\n },\r\n Site_Zip: {\r\n editable: false\r\n },\r\n Site_Selected: {\r\n editable: false\r\n }\r\n }\r\n }\r\n },\r\n //filter: [\r\n // {field: \"Site_Selected\", operator: \"eq\", value: \"'-1'\"}\r\n //],\r\n batch: true\r\n });\r\n\r\n $scope.kendo.sitesGridDS.read();\r\n $scope.kendo.sitesGrid.dataSource.data($scope.kendo.sitesGridDS.data());\r\n };\r\n\r\n $scope.kendo.productsGridInit = function (ds)\r\n {\r\n $scope.kendo.productsGridDS = new kendo.data.DataSource({\r\n data: ds,\r\n schema: {\r\n model: {\r\n fields: {\r\n ProdAliasGrp_Selected: {\r\n editable: false\r\n },\r\n ProdAliasGrp_Description: {\r\n editable: false\r\n }\r\n }\r\n }\r\n },\r\n batch: true\r\n });\r\n\r\n $scope.kendo.productsGridDS.read();\r\n $scope.kendo.productsGrid.dataSource.data($scope.kendo.productsGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CPPriceNotices))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 42;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsPricesSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n $scope.getWebProfileMessage(5);\r\n $scope.initPriceNoticesSettings();\r\n $scope.initModalSiteSelector();\r\n };\r\n\r\n $scope.initPriceNoticesSettings = function ()\r\n {\r\n $scope.appInfo.fuelCards.priceNoticesSettings = {};\r\n $scope.appInfo.fuelCards.priceNoticesSettings.methods = {};\r\n $scope.appInfo.fuelCards.priceNoticesSettings.allProducts = {\r\n CustContCPProd_Key: -1,\r\n CustContCPProd_CustCont_Key: null,\r\n ProdAliasGrp_Key: -1,\r\n ProdAliasGrp_ID: \"All\",\r\n ProdAliasGrp_Description: localStrings.getLocalizedString(\"AllProducts\"),\r\n ProdAliasGrp_Selected: \"0\",\r\n ts: null\r\n };\r\n $scope.refreshPriceNoticesSettings();\r\n };\r\n\r\n $scope.refreshPriceNoticesSettings = function ()\r\n {\r\n\r\n FuelCardsService.getPriceNoticesSettings(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n ).then\r\n (\r\n function (data)\r\n {\r\n //pull All Products record from the array and handle separately\r\n if (data.PriceNoticesSettingsGroups.length > 0)\r\n $scope.appInfo.fuelCards.priceNoticesSettings.allProducts = data.PriceNoticesSettingsGroups.splice(0, 1)[0] || [];\r\n\r\n $scope.kendo.sitesGridInit(data.PriceNoticesSettingsSites.sortBy('Site_Description'));\r\n $scope.kendo.productsGridInit(data.PriceNoticesSettingsGroups.sortBy('ProdAliasGrp_Description'));\r\n $scope.appInfo.fuelCards.priceNoticesSettings.methods = data.PriceNoticesSettingsMethods;\r\n\r\n $scope.kendo.sitesGrid.dataItems().forEach(function (item)\r\n {\r\n if (item.Site_Selected === '0')\r\n {\r\n $(\"tr[data-uid='\" + item.uid + \"']\").hide();\r\n }\r\n });\r\n }\r\n );\r\n\r\n if (!$scope.appInfo.fuelCards.company)\r\n {\r\n FuelCardsService.getCardsContext(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CompKey\r\n ).then(\r\n function (data)\r\n {\r\n $scope.appInfo.fuelCards.states = data.States;\r\n $scope.appInfo.fuelCards.company = data.Company;\r\n }\r\n );\r\n }\r\n };\r\n\r\n $scope.initModalSiteSelector = function ()\r\n {\r\n $scope.appInfo.fuelCards.modalSiteSelector = {};\r\n $scope.appInfo.fuelCards.modalSiteSelector.shown = false;\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch = {};\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.city = null;\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.state = '';\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.postal = null;\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.limit = false;\r\n $scope.appInfo.fuelCards.modalSiteSelector.toManyResults = false;\r\n $scope.appInfo.fuelCards.modalSiteSelector.maxResults = 100;\r\n };\r\n\r\n $scope.showModalSiteSelector = function ()\r\n {\r\n $scope.initModalSiteSelector();\r\n $scope.appInfo.fuelCards.modalSiteSelector.shown = true;\r\n };\r\n\r\n $scope.retrieveSites = function ()\r\n {\r\n FuelCardsService.getSearchSites(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.city,\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.state,\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.postal,\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.limit\r\n ).then\r\n (\r\n function (data)\r\n {\r\n $scope.kendo.siteSearchGridInit(data.SearchSites.sortBy('Site_Description'));\r\n\r\n if (data.SearchSites.length === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoResults\"), 'warning');\r\n return;\r\n }\r\n\r\n \r\n if ($scope.kendo.siteSearchGridDS.data().length > $scope.appInfo.fuelCards.modalSiteSelector.maxResults)\r\n $scope.appInfo.fuelCards.modalSiteSelector.toManyResults = true;\r\n else\r\n $scope.appInfo.fuelCards.modalSiteSelector.toManyResults = false;\r\n }\r\n );\r\n };\r\n\r\n $scope.checkAllProducts = function ()\r\n {\r\n angular.forEach($scope.kendo.productsGridDS.data(), function (item)\r\n {\r\n item.ProdAliasGrp_Selected = $scope.appInfo.fuelCards.priceNoticesSettings.allProducts.ProdAliasGrp_Selected || '0';\r\n });\r\n };\r\n\r\n $scope.disableNotices = function ()\r\n {\r\n angular.forEach($scope.appInfo.fuelCards.priceNoticesSettings.methods, function (item)\r\n {\r\n item.EmailSelected = '0';\r\n item.AltEmailSelected = '0';\r\n item.PhoneTextSelected = '0';\r\n });\r\n };\r\n\r\n $scope.addSites = function ()\r\n {\r\n angular.forEach($scope.kendo.siteSearchGridDS.data(), function (site)\r\n {\r\n if (site.CustContCPSite_Key === 0 && site.Site_Selected === '-1')\r\n {\r\n $scope.kendo.sitesGridDS.add(site);\r\n }\r\n });\r\n $scope.initModalSiteSelector();\r\n };\r\n\r\n $scope.removeSite = function (row)\r\n {\r\n row.Site_Selected = '0';\r\n $(\"tr[data-uid='\" + row.uid + \"']\").hide();\r\n };\r\n\r\n $scope.savePriceNoticeSettings = function ()\r\n {\r\n var products = $scope.kendo.productsGridDS.data().toJSON();\r\n var sites = $scope.kendo.sitesGridDS.data().toJSON();\r\n var hasProducts = products.any({ProdAliasGrp_Selected: '-1'});\r\n var hasSites = sites.any({Site_Selected: '-1'});\r\n if (!hasProducts || !hasSites)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"PriceNoticeSettings\"), localStrings.getLocalizedString(\"AtLeastOneProduct\"));\r\n return;\r\n }\r\n\r\n //put All Products back in its array for save\r\n products.unshift($scope.appInfo.fuelCards.priceNoticesSettings.allProducts);\r\n\r\n FuelCardsService.savePriceNoticeSettings(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n sites,\r\n products,\r\n $scope.appInfo.fuelCards.priceNoticesSettings.methods\r\n ).then\r\n (\r\n function (data)\r\n {\r\n $scope.initialize();\r\n }\r\n );\r\n };\r\n })\r\n;","/**\r\n * Created by jvitoria on 7/12/2015.\r\n */\r\nangular.module(\"pnDocAccount\", ['ngSanitize', 'core.objects', 'core.directives'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider.when(\"/Documents/Account/Statements\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Statements\"),\r\n controller: \"statementsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Documents/Account/Notifications\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Notifications\"),\r\n controller: \"notificationsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Documents/Account/Advice\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Advice\"),\r\n controller: \"adviceCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n ;\r\n })\r\n .controller(\"docAccountSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n };\r\n })\r\n .controller(\"statementsSideMenuCtrl\", function ($scope, localizationSvc)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"DateSelectorLocalization\"); \r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.options = [\r\n {name: localStrings.getLocalizedString(\"AllDays\"), value: 13},\r\n {name: localStrings.getLocalizedString(\"Today\"), value: 0},\r\n {name: localStrings.getLocalizedString(\"Yesterday\"), value: 1},\r\n {name: localStrings.getLocalizedString(\"ThisWeek\"), value: 3},\r\n {name: localStrings.getLocalizedString(\"ThisMonth\"), value: 4},\r\n {name: localStrings.getLocalizedString(\"ThisYear\"), value: 5},\r\n {name: localStrings.getLocalizedString(\"PriorWeek\"), value: 6},\r\n {name: localStrings.getLocalizedString(\"PriorMonth\"), value: 7},\r\n {name: localStrings.getLocalizedString(\"PriorYear\"), value: 8},\r\n {name: localStrings.getLocalizedString(\"LastSevenDays\"), value: 9},\r\n {name: localStrings.getLocalizedString(\"LastThirtyDays\"), value: 10},\r\n {name: localStrings.getLocalizedString(\"SelectDates\"), value: 11},\r\n {name: localStrings.getLocalizedString(\"SelectDays\"), value: 12}];\r\n };\r\n })\r\n .controller(\"statementsCtrl\", function ($scope, validatorSvc, WebFunctions, documentService, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.kendo = {};\r\n $scope.kendo.statementsGrid = {};\r\n $scope.kendo.statementsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n if (!dataItem.StmtEdocKey)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Documents\"), localStrings.getLocalizedString(\"SelectedDocumentNoLonger\"));\r\n return;\r\n }\r\n else\r\n $scope.openEdoc(dataItem.StmtEdocKey);\r\n\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"StmtDateTime\",\r\n title: localStrings.getLocalizedString(\"StatementDate\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.statementsGridInit = function (ds)\r\n {\r\n $scope.kendo.statementsGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.statementsGridDS.read();\r\n $scope.kendo.statementsGrid.dataSource.data($scope.kendo.statementsGridDS.data());\r\n };\r\n\r\n function getStatements()\r\n {\r\n documentService.getStatements(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate).then(function (data)\r\n {\r\n if (data.Success)\r\n {\r\n if (data.Data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"Statements\"));\r\n return;\r\n }\r\n\r\n data.Data.each(function (stmt)\r\n {\r\n stmt.StmtDateTime = Date.create(stmt.StmtDateTime).format('{MM}/{dd}/{yyyy}');\r\n });\r\n\r\n $scope.kendo.statementsGridInit(data.Data);\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Documents/Account/Notifications\");\r\n }\r\n\r\n //set the side menu location info\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"AccountSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n getStatements();\r\n };\r\n })\r\n .controller(\"notificationsSideMenuCtrl\", function ($scope, userAccountService, localizationSvc)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n $scope.kendo = {};\r\n\r\n function getContactsContext()\r\n {\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data) {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.CustomerContacts)) {\r\n $scope.modalifier.showSetupError();\r\n return;\r\n }\r\n\r\n angular.forEach(data.CustomerContacts, function (item) {\r\n item.fullName = item.FirstName + ' ' + item.LastName;\r\n });\r\n\r\n $scope.locationInfo.sideMenuData.notifications.contacts = data.CustomerContacts.findAll({ Active: -1 }).sortBy('fullName');\r\n $scope.locationInfo.sideMenuData.notifications.contacts.add({Key: null, fullName: localStrings.getLocalizedString(\"Any\")}, 0);\r\n });\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n $scope.locationInfo.sideMenuData.notifications = {\r\n contact: null,\r\n contacts: {},\r\n type: null,\r\n types: [{ key: null, value: localStrings.getLocalizedString(\"Any\") },\r\n { key: 0, value: localStrings.getLocalizedString(\"CreditLimit\") },\r\n { key: 1, value: localStrings.getLocalizedString(\"PrepaidBalance\") },\r\n { key: 2, value: localStrings.getLocalizedString(\"PastDuePayment\") },\r\n { key: 3, value: localStrings.getLocalizedString(\"OtherCreditCorrespondence\") },\r\n { key: 4, value: localStrings.getLocalizedString(\"ProductsServices\") },\r\n { key: 5, value: localStrings.getLocalizedString(\"GeneralBusinessCorrespondence\") }]\r\n };\r\n getContactsContext();\r\n };\r\n })\r\n .controller(\"notificationsCtrl\", function ($scope, validatorSvc, $sce, documentService, templates, localStrings)\r\n {\r\n 'use strict';\r\n validatorSvc.clearValidationScopes();\r\n $scope.kendo = {};\r\n $scope.kendo.notificationsGrid = {};\r\n $scope.kendo.notificationsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n if (!dataItem)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Notifications\"), localStrings.getLocalizedString(\"SelectedDocumentNoLonger\"));\r\n return;\r\n }\r\n\r\n $scope.handleRowClick(dataItem);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"NotcDescription\",\r\n title: localStrings.getLocalizedString(\"SubjectTitle\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"NotcType\",\r\n title: localStrings.getLocalizedString(\"Type\"),\r\n width: 200,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"RcptEmail\",\r\n title: localStrings.getLocalizedString(\"Recipient\"),\r\n width: 200,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"NotcDate\",\r\n title: localStrings.getLocalizedString(\"Date\"),\r\n width: 100,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: [],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.notificationsGridInit = function (ds)\r\n {\r\n $scope.kendo.notificationsGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n //$scope.resizeKendoGrid($scope.kendo.notificationsGrid, ds.length || 0, 295);\r\n\r\n $scope.kendo.notificationsGridDS.read();\r\n $scope.kendo.notificationsGrid.dataSource.data($scope.kendo.notificationsGridDS.data());\r\n };\r\n\r\n function getNotifications()\r\n {\r\n documentService.getNotifications(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.locationInfo.sideMenuData.notifications.contact,\r\n $scope.locationInfo.sideMenuData.notifications.type,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate\r\n ).then(function (data)\r\n {\r\n if (data.Success)\r\n {\r\n if (data.Data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"Notifications\"));\r\n return;\r\n }\r\n\r\n data.Data.each(function (note)\r\n {\r\n note.NotcDate = Date.create(note.NotcDate).format('{MM}/{dd}/{yyyy}');\r\n note.EmailBody = $sce.trustAsHtml(note.EmailBody);\r\n if (note.DispType === 1 || note.DispType === 3)\r\n {\r\n //note.NotcDescription = '';\r\n note.NotcType = 'Attachment';\r\n //note.RcptEmail = '';\r\n //note.NotcDate = '';\r\n }\r\n });\r\n\r\n $scope.kendo.notificationsGridInit(data.Data);\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n }\r\n\r\n $scope.$parent.applyAction = function () {\r\n if (!validatorSvc.executeValidations()) return;\r\n getNotifications();\r\n };\r\n\r\n $scope.handleRowClick = function handleRowClick(item)\r\n {\r\n switch (item.DispType)\r\n {\r\n case 0:\r\n $scope.emailPopUp = item;\r\n $scope.emailPopUp.show = true;\r\n break;\r\n\r\n case 1:\r\n case 2:\r\n if (item.EdocDtlKey > 0) $scope.openEdoc(item.EdocDtlKey);\r\n else\r\n scope.notifier.show(localStrings.getLocalizedString(\"DocumentNotRetrieved\"), 'error');\r\n break;\r\n\r\n case 3:\r\n if (item.AttachGUID !== null) $scope.openAttachment(item.AttachGUID);\r\n else\r\n scope.notifier.show(localStrings.getLocalizedString(\"DocumentNotRetrieved\"), 'error');\r\n break;\r\n }\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n //set the side menu location info\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"AccountSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n $scope.emailPopUp = {show: false};\r\n };\r\n })\r\n .controller('adviceSideMenuCtrl', function ($scope, $filter, WebFunctions, validatorSvc, documentService, templates, localizationSvc)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"AccountSideMenu\");\r\n\r\n $scope.locationInfo.sideMenuData.tenNinetyNineAdvice = {\r\n yearsBack: 5\r\n };\r\n $scope.exportReport = false;\r\n };\r\n })\r\n .controller(\"adviceCtrl\", function ($scope, $filter, WebFunctions, templates, localStrings, validatorSvc, documentService)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.adviceGrid = {};\r\n $scope.kendo.adviceGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n if(!dataItem.EdocDtlKey)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Documents\"), localStrings.getLocalizedString(\"SelectedDocumentNoLonger\"));\r\n return;\r\n }\r\n\r\n $scope.openEdoc(dataItem.EdocDtlKey);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"PmtYear\",\r\n title: localStrings.getLocalizedString(\"AdviceYear\"),\r\n width: 100,\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"DateTimeFormatted\",\r\n title: localStrings.getLocalizedString(\"ProcessDate\"),\r\n width: 150,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Name\",\r\n title: localStrings.getLocalizedString(\"BusinessEntity\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"PaymentType\",\r\n title: localStrings.getLocalizedString(\"PaymentType\"),\r\n width: 150,\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: [],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.predicate = 'DateTimeFormatted';\r\n $scope.reverse = false;\r\n $scope.modalifier.hide();\r\n\r\n documentService.Get1099AdviceList(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.locationInfo.sideMenuData.tenNinetyNineAdvice.yearsBack).then(\r\n function (data)\r\n {\r\n if (data.Success)\r\n {\r\n if (data.Data.length === 0) {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"TenNinetyNineKAdvice\"));\r\n }\r\n else\r\n {\r\n data.Data.each(function (element)\r\n {\r\n element.DateTimeFormatted = $filter('date')(element.DateTime, 'MM/dd/yyyy');\r\n element.PmtYear = element.PmtYear.toString();\r\n });\r\n\r\n $scope.kendo.adviceGridInit(data.Data);\r\n }\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n };\r\n\r\n $scope.kendo.adviceGridInit = function (ds)\r\n {\r\n $scope.kendo.adviceGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.adviceGridDS.read();\r\n $scope.kendo.adviceGrid.dataSource.data($scope.kendo.adviceGridDS.data());\r\n };\r\n\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n //set the side menu location info\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"AccountSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n };\r\n })\r\n;","/**\r\n * Created by rhampton on 7/25/2014.\r\n */\r\nangular.module(\"pnODPricing\", ['core.objects', 'services.payments', 'core.directives'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/Orders/BulkFuelPrices\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"BulkFuelPrices\"),\r\n controller: \"bulkFuelPricesCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Orders/WarehousePrices\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"WarehousePrices\"),\r\n controller: \"warehousePricesCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n }\r\n }\r\n }\r\n );\r\n })\r\n .controller(\"odPricingSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n };\r\n })\r\n .controller(\"bulkFuelPricesCtrl\", function ($scope, bulkFuelPriceNoticesService, $filter, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.bulkPricesGrid = {};\r\n $scope.kendo.bulkPricesGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var selectedRows = this.select();\r\n var dataItem = this.dataItem(selectedRows[0]);\r\n $scope.openEdoc(dataItem.EdocDtlKey);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"EffDateTimeFormatted\",\r\n title: localStrings.getLocalizedString(\"ReportDate\"),\r\n width: 100,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Location\",\r\n title: localStrings.getLocalizedString(\"Location\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.bulkPricesGridInit = function ()\r\n {\r\n $scope.kendo.bulkPricesGridDS = new kendo.data.DataSource({\r\n data: $scope.appInfo.bulkFuelPrices\r\n });\r\n\r\n $scope.kendo.bulkPricesGridDS.read();\r\n $scope.kendo.bulkPricesGrid.dataSource.data($scope.kendo.bulkPricesGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 21;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OdPricingSideMenu\");\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"1\",\r\n bulkFuelPrices: {\r\n location: 0\r\n }\r\n };\r\n if (!$scope.appInfo.bulkFuelPrices) $scope.appInfo.bulkFuelPrices = [];\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n $scope.modalifier.hide();\r\n $scope.predicate = 'EffDateTimeFormatted';\r\n $scope.reverse = false;\r\n bulkFuelPriceNoticesService.loadBulkFuelPrices($scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.locationInfo.sideMenuData.bulkFuelPrices.location,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate).then(function (data)\r\n {\r\n if (data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"BulkFuelPrices\"));\r\n }\r\n $scope.appInfo.bulkFuelPrices = data;\r\n angular.forEach($scope.appInfo.bulkFuelPrices, function (element)\r\n {\r\n element.EffDateTimeFormatted = $filter('date')(element.EffDateTime, 'MM/dd/yyyy');\r\n });\r\n $scope.kendo.bulkPricesGridInit();\r\n });\r\n };\r\n })\r\n .controller(\"bulkFuelPricesSideMenuCtrl\", function ($scope, templates, customerService, $filter, localizationSvc)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 21;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OdPricingSideMenu\");\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"1\",\r\n bulkFuelPrices: {\r\n location: 0\r\n }\r\n };\r\n $scope.$root.reportSettings.reportKey = 16;\r\n customerService.getCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, 1).then(function (data)\r\n {\r\n $scope.locations = $filter('filter')(data.Locations, {Active: '!0'});\r\n $scope.locations.unshift({\r\n Active: -1,\r\n Description: localStrings.getLocalizedString(\"All\"),\r\n Key: 0\r\n });\r\n $scope.locationInfo.sideMenuData.bulkFuelPrices.location = 0;\r\n });\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.bulkFuelPrices = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.bulkFuelPrices;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n })\r\n .controller(\"warehousePricesCtrl\", function ($scope, warehousePriceNoticesService, $filter, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.warehousePricesGrid = {};\r\n $scope.kendo.warehousePricesGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var selectedRows = this.select();\r\n var dataItem = this.dataItem(selectedRows[0]);\r\n $scope.openEdoc(dataItem.EdocDtlKey);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"EffDateTimeFormatted\",\r\n title: localStrings.getLocalizedString(\"ReportDate\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.warehousePricesGridInit = function ()\r\n {\r\n $scope.kendo.warehousePricesGridDS = new kendo.data.DataSource({\r\n data: $scope.appInfo.warehousePrices\r\n });\r\n\r\n $scope.kendo.warehousePricesGridDS.read();\r\n $scope.kendo.warehousePricesGrid.dataSource.data($scope.kendo.warehousePricesGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 21;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OdPricingSideMenu\");\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"2\",\r\n warehousePrices: {}\r\n };\r\n if (!$scope.appInfo.warehousePrices) $scope.appInfo.warehousePrices = [];\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n $scope.modalifier.hide();\r\n $scope.predicate = 'EffDateTimeFormatted';\r\n $scope.reverse = false;\r\n warehousePriceNoticesService.loadWarehousePrices($scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate).then(function (data)\r\n {\r\n if (data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"WarehousePrices\"));\r\n }\r\n $scope.appInfo.warehousePrices = data;\r\n angular.forEach($scope.appInfo.warehousePrices, function (element)\r\n {\r\n element.EffDateTimeFormatted = $filter('date')(element.EffDateTime, 'MM/dd/yyyy');\r\n });\r\n $scope.kendo.warehousePricesGridInit();\r\n });\r\n };\r\n\r\n\r\n })\r\n .controller(\"warehousePricesSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.$root.reportSettings.reportKey = 31;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.warehousePrices = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.warehousePrices;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n })\r\n;","/**\r\n * Created by rhampton on 7/25/2014.\r\n */\r\nangular.module(\"pnOrders\", ['core.objects', 'services.orders', 'core.directives'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/Orders/EditOrder/:ordKey?\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EditOrder\"),\r\n controller: \"editOrderCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Orders/DisplayOrder/:ordKey?\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"DisplayOrder\"),\r\n controller: \"displayOrderCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Orders/OpenOrders\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"OpenOrders\"),\r\n controller: \"openOrdersCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Orders/OrderHistory\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"OrderHistory\"),\r\n controller: \"orderHistoryCtrl\"\r\n }\r\n );\r\n })\r\n .controller(\"ordersSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.checkForAppliedProfile();\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.canOpenAddOrders = $scope.appInfo.webUser.CurrentAuthorization.CanAddEditWebOrders;\r\n };\r\n })\r\n .controller(\"displayOrderCtrl\", function ($scope, $filter, $route, $routeParams, validatorSvc, WebProfileService, customerService,\r\n userAccountService, ordersService, templates, localStrings, globalizationSvc)\r\n {\r\n 'use strict';\r\n\r\n function hasErrors(errors)\r\n {\r\n var errorsDisplayed = false;\r\n angular.forEach(errors, function (item)\r\n {\r\n $scope.notifier.show(item, 'error');\r\n errorsDisplayed = true;\r\n });\r\n\r\n return errorsDisplayed;\r\n }\r\n\r\n function getOrderContext()\r\n {\r\n // Do not try to load an order if the user info isnt loaded\r\n if (!$scope.appInfo.userLoaded) {\r\n $scope.goTo('Orders/OpenOrders/');\r\n return;\r\n }\r\n\r\n ordersService.getOrdersContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.WOGSettings))\r\n {\r\n $scope.modalifier.showSetupError();\r\n $scope.displayOrders.show.buttonBar = false;\r\n return;\r\n }\r\n\r\n $scope.displayOrders.context.WOGSettings = data.WOGSettings[0] || [];\r\n $scope.displayOrders.context.PONumber = data.PONumber;\r\n $scope.displayOrders.context.DeliveryDT = data.DeliveryDT;\r\n\r\n setButtonVisiblity();\r\n }\r\n );\r\n }\r\n\r\n function handleCancelOrder()\r\n {\r\n $scope.displayOrders.show.cancelCommentModal = false;\r\n ordersService.saveOrderDetails($scope.displayOrders.orderDetails).then(\r\n function (data)\r\n {\r\n if (hasErrors(data.OrderDetails.Errors))\r\n {\r\n enableButton();\r\n return;\r\n }\r\n\r\n $scope.notifier.show(localStrings.getLocalizedString(\"SavedChanges\"), \"success\");\r\n $scope.goTo('Orders/OpenOrders/');\r\n });\r\n }\r\n\r\n function handlePendingOrder()\r\n {\r\n ordersService.saveOrderDetails($scope.displayOrders.orderDetails).then(\r\n function (data)\r\n {\r\n //notify and drop out on errors\r\n if (angular.isUndefinedOrNullOrEmpty(data.OrderDetails.OrdKey) || data.OrderDetails.OrdKey === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesNotSaved\"), \"error\");\r\n enableButton();\r\n return;\r\n }\r\n\r\n if (hasErrors(data.OrderDetails.Errors))\r\n {\r\n enableButton();\r\n return;\r\n }\r\n\r\n //notify and handle success\r\n $scope.notifier.show(localStrings.getLocalizedString(\"SavedChanges\"), \"success\");\r\n $scope.goTo('Orders/EditOrder/' + data.OrderDetails.OrdKey);\r\n });\r\n }\r\n\r\n function handleReOpenOrder()\r\n {\r\n var yes = function ()\r\n {\r\n ordersService.saveOrderDetails($scope.displayOrders.orderDetails).then(\r\n function (data)\r\n {\r\n if (hasErrors(data.OrderDetails.Errors))\r\n {\r\n enableButton();\r\n return;\r\n }\r\n\r\n $scope.goTo('Orders/EditOrder/' + data.OrderDetails.OrdKey);\r\n });\r\n };\r\n\r\n var no = function () {\r\n enableButton();\r\n };\r\n\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"IfYouReopenOrder\") + '
    ' + localStrings.getLocalizedString(\"MayNoLonger\") + '

    ' + localStrings.getLocalizedString(\"WishToContinue\"), yes, no);\r\n }\r\n\r\n function handleSubmitOrder()\r\n {\r\n ordersService.saveOrderDetails($scope.displayOrders.orderDetails).then(\r\n function (data)\r\n {\r\n if (hasErrors(data.OrderDetails.Errors))\r\n {\r\n enableButton();\r\n return;\r\n }\r\n\r\n //notify and handle success\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesBeenSubmitted\"), \"success\");\r\n $route.reload();\r\n });\r\n }\r\n\r\n function enableButton() {\r\n $('#displayOrderReOpen').removeAttr('disabled');\r\n $('#displayOrderSubmit').removeAttr('disabled');\r\n $('#displayOrderCancel').removeAttr('disabled');\r\n $('#displayOrderCancelComment').removeAttr('disabled');\r\n }\r\n\r\n function setButtonVisiblity()\r\n {\r\n // show buttons based ont he order status\r\n switch ($scope.displayOrders.orderDetails.OrdStatusKey)\r\n {\r\n case 16:\r\n $scope.displayOrders.show.reopenBtn = false;\r\n $scope.displayOrders.show.submitBtn = submitOnHold();\r\n $scope.displayOrders.show.cancelBtn = true;\r\n break;\r\n\r\n case 0:\r\n case 1:\r\n $scope.displayOrders.show.reopenBtn = true;\r\n $scope.displayOrders.show.submitBtn = false;\r\n $scope.displayOrders.show.cancelBtn = true;\r\n break;\r\n\r\n case 10:\r\n $scope.displayOrders.show.reopenBtn = false;\r\n $scope.displayOrders.show.submitBtn = false;\r\n $scope.displayOrders.show.cancelBtn = true;\r\n break;\r\n\r\n default:\r\n $scope.displayOrders.show.reopenBtn = false;\r\n $scope.displayOrders.show.submitBtn = false;\r\n $scope.displayOrders.show.cancelBtn = false;\r\n break;\r\n }\r\n }\r\n\r\n function submitOnHold()\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.displayOrders.context.WOGSettings))\r\n return false;\r\n else\r\n return $scope.displayOrders.context.WOGSettings.SubmitOnHold || $scope.displayOrders.context.WOGSettings.CrStatus !== 1;\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n //clear any residual validations from the scope\r\n validatorSvc.clearValidationScopes();\r\n\r\n //set the side menu location info\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.addOrder = $scope.locationInfo.sideMenuData.addOrder || {};\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OrdersSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n\r\n //start with a clean data structure\r\n $scope.displayOrders = {\r\n show: {\r\n reopenBtn: false,\r\n submitBtn: false,\r\n cancelBtn: false,\r\n tankIDCol: false,\r\n cancelCommentModal: false\r\n },\r\n context: {},\r\n orderDetails: ordersService.blankOrderHeaderObj()\r\n };\r\n\r\n $scope.globalizationSvc = globalizationSvc;\r\n\r\n //get the credit hold message\r\n WebProfileService.getWebProfileMessage($scope.appInfo.profileKey, 25).then(function (data)\r\n {\r\n $scope.displayOrders.context.creditHoldMessage = data;\r\n });\r\n\r\n getOrderContext();\r\n\r\n //get the order to be displayed\r\n if ($routeParams.ordKey)\r\n {\r\n ordersService.getOrderDetails($routeParams.ordKey).then(\r\n function (data)\r\n {\r\n $scope.displayOrders.orderDetails = data.OrderDetails || {};\r\n\r\n //get the tank/product context for this location\r\n $scope.getLocationDetails();\r\n\r\n setButtonVisiblity();\r\n }\r\n );\r\n }\r\n };\r\n\r\n $scope.getLocationDetails = function getLocationDetails()\r\n {\r\n $scope.displayOrders.context.tanksAndEquipment = [];\r\n ordersService.getOrderLocationInfo($scope.displayOrders.orderDetails.CustLocKey, $scope.displayOrders.orderDetails.ReqDelivDateTime).then(\r\n function (data)\r\n {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.TanksAndEquipment))\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoTankInformation\"), 'error');\r\n return;\r\n }\r\n else\r\n {\r\n $scope.displayOrders.context.tanksAndEquipment = data.TanksAndEquipment;\r\n }\r\n\r\n //use default directions if the order has none\r\n if (angular.isUndefinedOrNullOrEmpty($scope.displayOrders.orderDetails.OrdDelivDirections))\r\n $scope.displayOrders.orderDetails.OrdDelivDirections = data.DeliveryDirections;\r\n\r\n //determine if TankID column is shown\r\n $scope.displayOrders.show.tankIDCol = false;\r\n angular.forEach($scope.displayOrders.context.tanksAndEquipment, function (item)\r\n {\r\n // check if ID is null or undefined first\r\n if (item.ID) {\r\n $scope.displayOrders.show.tankIDCol = !item.ID.isBlank();\r\n }\r\n\r\n //match and copy over the qty to be displayed\r\n if (!angular.isUndefinedOrNullOrEmpty(item.TankNumber)) {\r\n var tank = $filter('filter')($scope.displayOrders.orderDetails.OrderDetails, { TankNumber: item.TankNumber }, true)[0];\r\n item.Quantity = angular.isUndefinedOrNullOrEmpty(tank) ? 0 : globalizationSvc.formatNumeric(tank.OrderQty);\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty(item.EquipmentKey)) {\r\n var equipment = $filter('filter')($scope.displayOrders.orderDetails.OrderDetails, { EquipmentKey: item.EquipmentKey }, true)[0];\r\n item.Quantity = angular.isUndefinedOrNullOrEmpty(equipment) ? 0 : globalizationSvc.formatNumeric(equipment.OrderQty);\r\n }\r\n \r\n });\r\n }\r\n );\r\n };\r\n\r\n $scope.hasAnyTanks = function () {\r\n return hasAnyItems('TankNumber');\r\n };\r\n\r\n $scope.hasAnyEquipment = function () {\r\n return hasAnyItems('EquipmentKey');\r\n };\r\n\r\n function hasAnyItems(keyProperty) {\r\n if ($scope.displayOrders.context && $scope.displayOrders.context.tanksAndEquipment) {\r\n for (var i = 0; i < $scope.displayOrders.context.tanksAndEquipment.length; i++) {\r\n if ($scope.displayOrders.context.tanksAndEquipment[i][keyProperty]) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n $scope.saveOrder = function saveOrder(command)\r\n {\r\n $scope.displayOrders.orderDetails.Command = command;\r\n $scope.displayOrders.orderDetails.OrdCreatedByContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n\r\n switch (command)\r\n {\r\n case 'Pending':\r\n handlePendingOrder();\r\n break;\r\n\r\n case 'Submit':\r\n handleSubmitOrder();\r\n break;\r\n\r\n case 'ReOpen':\r\n handleReOpenOrder();\r\n break;\r\n\r\n case 'Cancel':\r\n handleCancelOrder();\r\n break;\r\n }\r\n };\r\n\r\n $scope.cancelCommentModalDialogClose = function () {\r\n enableButton();\r\n };\r\n\r\n })\r\n .controller(\"editOrderCtrl\", function ($scope, $filter, $route, $routeParams, validatorSvc, WebProfileService, customerService, userAccountService, ordersService, templates, localStrings, globalizationSvc, $timeout)\r\n {\r\n 'use strict';\r\n\r\n $scope.editOrders = {\r\n show: {\r\n buttonBar: true,\r\n shipTo: false,\r\n tankIDCol: false,\r\n submitBtn: false,\r\n cancelCommentModal: false\r\n },\r\n locations: undefined,\r\n contacts: undefined,\r\n context: {},\r\n orderDetails: {}\r\n };\r\n\r\n $scope.prevCustLocKey = undefined;\r\n $scope.hideTankAndEquipment = false;\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.ordersGrid = {};\r\n $scope.kendo.ordersGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"TankNumber\",\r\n title: localStrings.getLocalizedString(\"Tank\"),\r\n attributes: {class: \"alignCenter\"},\r\n width: 50,\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"TankID\",\r\n title: localStrings.getLocalizedString(\"ID\"),\r\n width: 100,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Product\",\r\n title: localStrings.getLocalizedString(\"Product\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"OrderQty\",\r\n title: localStrings.getLocalizedString(\"Quantity\"),\r\n width: 100,\r\n format: \"{0:n0}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n },\r\n template: '',\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"class\", \"alignRight\")\r\n .appendTo(element)\r\n .kendoNumericTextBox({\r\n decimals: 0,\r\n format: \"#\",\r\n min: 0,\r\n spinners: false\r\n });\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n }\r\n ],\r\n dataSource: [],\r\n editable: true,\r\n filterable: false,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n $scope.kendo.ordersEquipmentGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"EquipmentID\",\r\n title: localStrings.getLocalizedString(\"Equipment\"),\r\n width: 200,\r\n attributes: { class: \"alignLeft\" },\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n },\r\n template: \"# if (EquipmentID) { # #:EquipmentID# - #:EquipmentDescription# # } # \"\r\n },\r\n {\r\n field: \"Product\",\r\n title: localStrings.getLocalizedString(\"Product\"),\r\n attributes: { class: \"alignLeft\" },\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"OrderQty\",\r\n title: localStrings.getLocalizedString(\"Quantity\"),\r\n width: 100,\r\n format: \"{0:n0}\",\r\n attributes: { class: \"alignRight\" },\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n },\r\n editor: function (element, options) {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"class\", \"alignRight\")\r\n .appendTo(element)\r\n .kendoNumericTextBox({\r\n decimals: 0,\r\n format: \"#\",\r\n min: 0,\r\n spinners: false\r\n });\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n }\r\n ],\r\n dataSource: [],\r\n editable: true,\r\n filterable: false,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.ordersGridInit = function (ds, showIdCol)\r\n {\r\n $scope.kendo.ordersGridDS = new kendo.data.DataSource({\r\n data: ds,\r\n schema: {\r\n model: {\r\n id: \"TankNumber\",\r\n fields: {\r\n TankNumber: {\r\n type: \"number\",\r\n editable: false,\r\n nullable: false,\r\n validation: false\r\n },\r\n TankID: {\r\n type: \"string\",\r\n editable: true,\r\n nullable: true,\r\n validation: false\r\n },\r\n Product: {\r\n type: \"string\",\r\n editable: false,\r\n nullable: false,\r\n validation: false\r\n },\r\n OrderQty: {\r\n type: \"number\",\r\n editable: true,\r\n nullable: false,\r\n validation: {\r\n capacity: function (e)\r\n {\r\n if(e.is('[name=OrderQty]'))\r\n {\r\n var rowData = $scope.kendo.ordersGrid.dataItem(e.closest('tr'));\r\n var val = e.getKendoNumericTextBox().value();\r\n\r\n rowData.OrderQty = val; //stop kendo from zeroing out the value on error\r\n\r\n if (e.val().isBlank())\r\n {\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"Required\"));\r\n return false;\r\n }\r\n\r\n if (val < 0)\r\n {\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"MinValueZero\"));\r\n return false;\r\n }\r\n\r\n if (val > rowData.MaxVolume)\r\n {\r\n var rowDataMaxVolume = [rowData.MaxVolume];\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"MaxValue\", rowDataMaxVolume));\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n $scope.kendo.ordersGridDS.read();\r\n $scope.kendo.ordersGrid.dataSource.data($scope.kendo.ordersGridDS.data());\r\n\r\n if (showIdCol)\r\n $scope.kendo.ordersGrid.showColumn(1);\r\n else\r\n $scope.kendo.ordersGrid.hideColumn(1);\r\n };\r\n $scope.kendo.ordersEquipmentGridInit = function (ds) {\r\n $scope.kendo.ordersEquipmentGridDS = new kendo.data.DataSource({\r\n data: ds,\r\n schema: {\r\n model: {\r\n id: \"EquipmentKey\",\r\n fields: {\r\n EquipmentKey: {\r\n type: \"number\",\r\n editable: false\r\n },\r\n EquipmentID: {\r\n type: \"string\",\r\n editable: false\r\n },\r\n EquipmentDescription: {\r\n type: \"string\",\r\n editable: false\r\n },\r\n Product: {\r\n type: \"string\",\r\n editable: false\r\n },\r\n OrderQty: {\r\n type: \"number\",\r\n editable: true,\r\n nullable: false,\r\n validation: {\r\n capacity: function (e) {\r\n if (e.is('[name=OrderQty]')) {\r\n var rowData = $scope.kendo.ordersEquipmentGrid.dataItem(e.closest('tr'));\r\n var val = e.getKendoNumericTextBox().value();\r\n\r\n rowData.OrderQty = val; //stop kendo from zeroing out the value on error\r\n\r\n if (e.val().isBlank()) {\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"Required\"));\r\n return false;\r\n }\r\n\r\n if (val < 0) {\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"MinValueZero\"));\r\n return false;\r\n }\r\n\r\n // If equipment does not have ActualSize or RatedSize (MaxVolume) -> we won't be validating MaxVolume\r\n if (!angular.isUndefinedOrNullOrEmpty(rowData.MaxVolume)) {\r\n if (val > rowData.MaxVolume) {\r\n var rowDataMaxVolume = [rowData.MaxVolume];\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"MaxValue\", rowDataMaxVolume));\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n $scope.kendo.ordersEquipmentGridDS.read();\r\n $scope.kendo.ordersEquipmentGrid.dataSource.data($scope.kendo.ordersEquipmentGridDS.data());\r\n };\r\n\r\n var validateOrderDate =\r\n {\r\n name: 'validateOrderDate',\r\n validationMessage: localStrings.getLocalizedString(\"RequestedDeliveryDateTimeIs\") + '
    ' + localStrings.getLocalizedString(\"NotAvailable\"),\r\n validatorError: function ()\r\n {\r\n if ($scope.editOrders.orderDetails.Command === 'Cancel')\r\n {\r\n return true;\r\n }\r\n\r\n if ($scope.editOrders.orderDetails.ReqDelivDateTime.isBlank()) {\r\n return false;\r\n }\r\n\r\n var valueDate = new Date($scope.editOrders.orderDetails.ReqDelivDateTime);\r\n var nowDate = new Date();\r\n\r\n return valueDate < nowDate ? false : true;\r\n }\r\n };\r\n var savedTankData = [], dataBetweenDateChanges = [];\r\n $scope.validateOrderDate = new pdi.ng.validate.PdiValidation(validateOrderDate);\r\n\r\n function hasErrors(errors)\r\n {\r\n var errorsDisplayed = false;\r\n angular.forEach(errors, function (item)\r\n {\r\n $scope.notifier.show(item, 'error');\r\n errorsDisplayed = true;\r\n });\r\n\r\n return errorsDisplayed;\r\n }\r\n\r\n function getContactsContext()\r\n {\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.CustomerContacts))\r\n {\r\n $scope.modalifier.showSetupError();\r\n $scope.editOrders.show.buttonBar = false;\r\n return;\r\n }\r\n\r\n angular.forEach(data.CustomerContacts, function (item)\r\n {\r\n item.fullName = item.FirstName + ' ' + item.LastName;\r\n });\r\n\r\n $scope.editOrders.contacts = data.CustomerContacts.findAll({Active: -1}).sortBy('fullName');\r\n\r\n });\r\n }\r\n\r\n function getCreditHoldMsg()\r\n {\r\n WebProfileService.getWebProfileMessage($scope.appInfo.profileKey, 25).then(function (data)\r\n {\r\n $scope.editOrders.context.creditHoldMessage = data;\r\n });\r\n }\r\n\r\n function getLocationsContext()\r\n {\r\n ordersService.getOrderCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, $scope.editOrders.orderDetails.ReqDelivDateTime || $scope.editOrders.context.MinDateTime).then(\r\n function (data) {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.OrderLocations)) {\r\n $scope.modalifier.showSetupError();\r\n $scope.editOrders.show.buttonBar = false;\r\n return;\r\n }\r\n\r\n $scope.editOrders.locations = data.OrderLocations.remove({ Active: 0 }).sortBy('Description');\r\n\r\n if ($scope.editOrders.locations.length > 1)\r\n $scope.editOrders.show.shipTo = true;\r\n else {\r\n $scope.editOrders.show.shipTo = false;\r\n }\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($routeParams.ordKey)) {\r\n // in case of a new order, remove all locations without valid tanks / equipment\r\n $scope.editOrders.locations = $scope.editOrders.locations.remove({ HasValidTankOrEquipment: 0 });\r\n $scope.editOrders.orderDetails.CustLocKey = $scope.editOrders.locations[0].Key;\r\n $scope.updateCustomerLocationData();\r\n } else {\r\n // in case of an existing order, remove all locations without valid tanks / equipment except location on order\r\n $scope.editOrders.locations = $scope.editOrders.locations.filter(function (l) {\r\n return l.HasValidTankOrEquipment !== 0 || l.Key === $scope.editOrders.orderDetails.CustLocKey;\r\n });\r\n $scope.editOrders.locations.sort(function (l) {\r\n return l.CustLocKey - (l.CustLocKey === $scope.editOrders.orderDetails.CustLocKey ? l.Key + 1 : l.CustLocKey - 2);\r\n });\r\n }\r\n });\r\n }\r\n\r\n function getOrderContext()\r\n {\r\n ordersService.getOrdersContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.WOGSettings))\r\n {\r\n $scope.modalifier.showSetupError();\r\n $scope.editOrders.show.buttonBar = false;\r\n return;\r\n }\r\n\r\n $scope.editOrders.context.WOGSettings = data.WOGSettings[0] || [];\r\n $scope.editOrders.context.PONumber = data.PONumber;\r\n $scope.editOrders.context.DeliveryDT = data.DeliveryDT;\r\n\r\n $scope.editOrders.show.submitBtn = data.WOGSettings.SubmitOnHold || data.WOGSettings.CrStatus !== 1;\r\n getLocationsContext();\r\n }\r\n );\r\n }\r\n\r\n function loadExistingOrder()\r\n {\r\n ordersService.getOrderDetails($routeParams.ordKey).then(\r\n function (data)\r\n {\r\n savedTankData = data.OrderDetails.OrderDetails.clone();\r\n data.OrderDetails.OrderDetails = [];\r\n $scope.editOrders.orderDetails = data.OrderDetails;\r\n $scope.editOrders.context.DeliveryDT = data.OrderDetails.ReqDelivDateTime;\r\n $scope.editOrders.show.cancelBtn = true;\r\n\r\n $scope.editOrders.orderDetails.CustContKey = $scope.editOrders.orderDetails.CustContKey.toNumber();\r\n $scope.prevCustLocKey = $scope.initialOrderCustLocKey = $scope.editOrders.orderDetails.CustLocKey;\r\n $scope.updateCustomerLocationData();\r\n }\r\n );\r\n }\r\n\r\n function loadNewOrder()\r\n {\r\n $scope.editOrders.orderDetails = new ordersService.blankOrderHeaderObj();\r\n\r\n $scope.editOrders.orderDetails.CustContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n\r\n }\r\n Number.isInteger = Number.isInteger || function (value) {\r\n return typeof value === \"number\" &&\r\n isFinite(value) &&\r\n Math.floor(value) === value;\r\n };\r\n function qtyValidityStates(items) {\r\n return items.map(\r\n function (order) {\r\n if (!Number.isInteger(order.OrderQty)) {\r\n return false;\r\n }\r\n\r\n if (order.OrderQty < 0) {\r\n return false;\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty(order.MaxVolume) && order.OrderQty > order.MaxVolume) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n );\r\n }\r\n\r\n // This returns an array of boolean values\r\n // use .every to see if all the values are true or false\r\n function validOrderQtys(items) {\r\n return (qtyValidityStates(items).every(Boolean));\r\n }\r\n\r\n function validOrder()\r\n {\r\n $scope.orderQtyWarning = {\r\n show: false,\r\n text: ''\r\n };\r\n\r\n var orderTotal = ($scope.kendo.ordersGrid.dataSource.data().toJSON().sum('OrderQty') || 0) + ($scope.kendo.ordersEquipmentGrid.dataSource.data().toJSON().sum('OrderQty') || 0);\r\n var OrdQtyParams = [$scope.editOrders.context.WOGSettings.OrdMinQty, $scope.editOrders.context.WOGSettings.OrdMaxQty];\r\n\r\n if (!validOrderQtys($scope.kendo.ordersGrid.dataSource.data()) || !validOrderQtys($scope.kendo.ordersEquipmentGrid.dataSource.data())) {\r\n $scope.orderQtyWarning = {\r\n show: true,\r\n text: localStrings.getLocalizedString(\"InvalidTankQuantity\")\r\n };\r\n }\r\n\r\n if (orderTotal < $scope.editOrders.context.WOGSettings.OrdMinQty)\r\n {\r\n $scope.orderQtyWarning = {\r\n show: true,\r\n text: localStrings.getLocalizedString(\"DoesNotMeetMinimum\", OrdQtyParams)\r\n };\r\n }\r\n\r\n if (orderTotal > $scope.editOrders.context.WOGSettings.OrdMaxQty)\r\n {\r\n $scope.orderQtyWarning = {\r\n show: true,\r\n text: localStrings.getLocalizedString(\"OrderExceedsMaximum\", OrdQtyParams)\r\n };\r\n }\r\n\r\n return validatorSvc.executeValidations() && !$scope.orderQtyWarning.show;\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.checkForAppliedProfile();\r\n\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.addOrder = $scope.locationInfo.sideMenuData.addOrder || {};\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OrdersSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n\r\n getContactsContext();\r\n getOrderContext();\r\n getCreditHoldMsg();\r\n\r\n if ($routeParams.ordKey) {\r\n loadExistingOrder();\r\n }\r\n else {\r\n loadNewOrder();\r\n }\r\n };\r\n\r\n $scope.saveOrder = function saveOrder(command) {\r\n // If command is submit we need to save the details before we submit them.\r\n if (command === 'Submit') {\r\n $scope.editOrders.orderDetails.Command = 'Pending';\r\n } else {\r\n $scope.editOrders.orderDetails.Command = command;\r\n }\r\n\r\n if (!validOrder()) {\r\n enableButton();\r\n return;\r\n }\r\n\r\n $scope.resetDirtyFlags($scope.editOrders.editForm);\r\n\r\n $scope.editOrders.orderDetails.OrdCreatedByContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n $scope.editOrders.orderDetails.OrderDetails = $scope.kendo.ordersGrid.dataSource.data().toJSON().concat($scope.kendo.ordersEquipmentGrid.dataSource.data().toJSON());\r\n ordersService.saveOrderDetails($scope.editOrders.orderDetails).then(\r\n function (data) {\r\n //notify and drop out on errors\r\n if (angular.isUndefinedOrNullOrEmpty(data.OrderDetails.OrdKey) || data.OrderDetails.OrdKey === 0) {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesNotSaved\"), \"error\");\r\n hasErrors(data.OrderDetails.Errors);\r\n enableButton();\r\n return;\r\n }\r\n\r\n if (hasErrors(data.OrderDetails.Errors)) {\r\n enableButton();\r\n return;\r\n }\r\n\r\n if ($scope.editOrders.orderDetails.Command !== command) {\r\n data.OrderDetails.Command = command;\r\n\r\n ordersService.saveOrderDetails(data.OrderDetails).then(\r\n function (submit) {\r\n //notify and drop out on errors\r\n if (angular.isUndefinedOrNullOrEmpty(submit.OrderDetails.OrdKey) || submit.OrderDetails.OrdKey === 0) {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesNotSaved\"), \"error\");\r\n hasErrors(submit.OrderDetails.Errors);\r\n enableButton();\r\n return;\r\n }\r\n\r\n if (hasErrors(submit.OrderDetails.Errors)) {\r\n enableButton();\r\n return;\r\n }\r\n });\r\n }\r\n\r\n //notify and handle success\r\n switch (command) {\r\n case 'Pending':\r\n $scope.notifier.show(localStrings.getLocalizedString(\"SavedChanges\"), \"success\");\r\n $scope.goTo('Orders/EditOrder/' + data.OrderDetails.OrdKey);\r\n loadExistingOrder();\r\n enableButton();\r\n break;\r\n\r\n case 'Submit':\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesBeenSubmitted\"), \"success\");\r\n $scope.goTo('Orders/DisplayOrder/' + data.OrderDetails.OrdKey);\r\n break;\r\n\r\n case 'Cancel':\r\n $scope.notifier.show(localStrings.getLocalizedString(\"SavedChanges\"), \"success\");\r\n $scope.goTo('Orders/OpenOrders/');\r\n break;\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.cancelCommentModalDialogClose = function () {\r\n enableButton();\r\n };\r\n\r\n function enableButton() {\r\n $('#editOrderPending').removeAttr('disabled');\r\n $('#editOrderSubmit').removeAttr('disabled');\r\n $('#editOrderCancel').removeAttr('disabled');\r\n $('#editOrderCancelComment').removeAttr('disabled');\r\n }\r\n\r\n function mergeTankData(target, source)\r\n {\r\n //filter out records with non-existent tank / equipment\r\n target = target.filter(function (t) {\r\n for (var i = 0; i < source.length; i++) {\r\n if ((t.TankNumber && source[i].TankNumber === t.TankNumber) || (t.EquipmentKey && source[i].EquipmentKey === t.EquipmentKey)) {\r\n return true;\r\n }\r\n }\r\n if (t.TankNumber && $scope.initialOrderCustLocKey === $scope.editOrders.orderDetails.CustLocKey) {\r\n $scope.notifier.show(\"Tank #\" + t.TankNumber + \" is no longer valid for this customer's location and will be removed from the order. Please click save or resubmit the order to proceed\", 'warning');\r\n }\r\n return false;\r\n });\r\n //iterate through each item(s) in the source array\r\n source.each(function (s)\r\n {\r\n var t = null;\r\n if (s.EquipmentKey) {\r\n t = target.find({ EquipmentKey: s.EquipmentKey });\r\n if (!t) {\r\n t = {};\r\n target.add(t);\r\n }\r\n } else {\r\n //look for a matching item in the target\r\n t = target.find({TankNumber: s.TankNumber});\r\n\r\n //not matching item so lets make one\r\n if (!t)\r\n t = target\r\n .add(new ordersService.blankOrderDetailsObj())\r\n .last();\r\n }\r\n\r\n //if the source property value is empty, copy over the target value\r\n for (var p in s)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(t[p]))\r\n t[p] = s[p];\r\n }\r\n\r\n //set null quantity to zero\r\n if (angular.isUndefinedOrNullOrEmpty(t['OrderQty'])) t['OrderQty'] = 0;\r\n });\r\n\r\n $scope.editOrders.orderDetails.OrderDetails = target.filter(function (t) { return t.TankNumber; }).sortBy('TankNumber');\r\n $scope.editOrders.orderDetails.OrderEquipmentDetails = target.filter(function (t) { return t.EquipmentKey; }).sortBy('EquipmentID');\r\n savedTankData = [];\r\n }\r\n\r\n function copyTankData(source)\r\n {\r\n var finalItems = [];\r\n //iterate through each item (s) in the source array\r\n source.each(function (s)\r\n {\r\n var existing = dataBetweenDateChanges.find({ CustFuelTankKey: s.CustFuelTankKey });\r\n\r\n if (existing) {\r\n finalItems.push(existing);\r\n } else {\r\n //set null quantity to zero\r\n if (angular.isUndefinedOrNullOrEmpty(s['OrderQty'])) s['OrderQty'] = 0;\r\n finalItems.push(s);\r\n }\r\n });\r\n\r\n $scope.editOrders.orderDetails.OrderDetails = finalItems.sortBy('TankNumber');\r\n }\r\n function copyEquipmentData(source) {\r\n var finalItems = [];\r\n source.each(function (s) {\r\n var existing = dataBetweenDateChanges.find({ EquipmentKey: s.EquipmentKey });\r\n if (existing) {\r\n finalItems.push(existing);\r\n } else {\r\n //set null quantity to zero\r\n if (angular.isUndefinedOrNullOrEmpty(s['OrderQty'])) s['OrderQty'] = 0;\r\n finalItems.push(s);\r\n }\r\n });\r\n\r\n $scope.editOrders.orderDetails.OrderEquipmentDetails = finalItems.sortBy('EquipmentID');\r\n }\r\n\r\n var updateCustomerLocationDataLock = 0;\r\n $scope.updateCustomerLocationData = function() {\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($scope.editOrders.orderDetails.CustLocKey) || angular.isUndefinedOrNullOrEmpty($scope.editOrders.orderDetails.ReqDelivDateTime)) {\r\n return;\r\n }\r\n\r\n if (updateCustomerLocationDataLock === 0) {\r\n updateCustomerLocationDataLock++;\r\n // because of equipment we have to send also date parameter\r\n ordersService.getOrderLocationInfo($scope.editOrders.orderDetails.CustLocKey, $scope.editOrders.orderDetails.ReqDelivDateTime).then( // OMG this is string instead of date!\r\n function (data) {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.TanksAndEquipment)) {\r\n $scope.editOrders.show.buttonBar = false;\r\n $scope.notifier.show('Could not find any tank information for the selected Ship To location', 'error');\r\n $scope.hideTankAndEquipment = true;\r\n updateCustomerLocationDataLock--;\r\n return;\r\n }\r\n else {\r\n var validTankOrEquipment = true;\r\n if (!savedTankData.isEmpty()) {\r\n mergeTankData(savedTankData, data.TanksAndEquipment);\r\n // check if order customer location has valid tank and / or equipment\r\n validTankOrEquipment = $scope.editOrders.orderDetails.OrderDetails.length > 0 || $scope.editOrders.orderDetails.OrderEquipmentDetails.length > 0;\r\n }\r\n else {\r\n copyTankData(data.TanksAndEquipment.filter(function (te) { return te.TankNumber; }));\r\n copyEquipmentData(data.TanksAndEquipment.filter(function (te) { return te.EquipmentKey; }));\r\n if ($scope.editOrders.orderDetails.OrderDetails.length <= 0) {\r\n $scope.notifier.show('Could not find any tank information for the selected Ship To location', 'warning');\r\n }\r\n }\r\n dataBetweenDateChanges = [];\r\n\r\n $scope.hideTankAndEquipment = !validTankOrEquipment;\r\n $scope.editOrders.show.buttonBar = validTankOrEquipment;\r\n }\r\n\r\n $scope.editOrders.context.DeliveryDT = data.DeliveryDT;\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($scope.editOrders.orderDetails.OrdDelivDirections) ||\r\n angular.isUndefinedOrNullOrEmpty($scope.editOrders.orderDetails.OrdKey)) {\r\n $scope.editOrders.orderDetails.OrdDelivDirections = data.DeliveryDirections;\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.prevCustLocKey) &&\r\n ($scope.prevCustLocKey) !== ($scope.editOrders.orderDetails.CustLocKey)) {\r\n $scope.editOrders.orderDetails.OrdDelivDirections = data.DeliveryDirections;\r\n $scope.prevCustLocKey = $scope.editOrders.orderDetails.CustLocKey;\r\n }\r\n\r\n $scope.kendo.ordersGridInit($scope.editOrders.orderDetails.OrderDetails, !$scope.editOrders.orderDetails.OrderDetails.all({ ID: \"\" }));\r\n $scope.kendo.ordersEquipmentGridInit($scope.editOrders.orderDetails.OrderEquipmentDetails);\r\n updateCustomerLocationDataLock--;\r\n }, function (error) {\r\n updateCustomerLocationDataLock--;\r\n throw error;\r\n }\r\n );\r\n }\r\n };\r\n\r\n $scope.$watch('editOrders.context.DeliveryDT', function updateDateTime()\r\n {\r\n let requestedDT, suggestedDT, theWinner;\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.editOrders.orderDetails.ReqDelivDateTime) && \r\n !isNaN(Date.parse($scope.editOrders.orderDetails.ReqDelivDateTime))) {\r\n requestedDT = new Date($scope.editOrders.orderDetails.ReqDelivDateTime.replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.editOrders.context.DeliveryDT) && \r\n !isNaN(Date.parse($scope.editOrders.context.DeliveryDT)))\r\n {\r\n let temp = $scope.editOrders.context.DeliveryDT;\r\n suggestedDT = new Date(temp.replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n }\r\n\r\n if (requestedDT >= suggestedDT) {\r\n theWinner = requestedDT;\r\n }\r\n\r\n //save for validation\r\n $scope.editOrders.context.MinDateTime = theWinner;\r\n $scope.editOrders.orderDetails.ReqDelivDateTime = $filter('date')(new Date(theWinner), 'MM/dd/yyyy h:mm a');\r\n });\r\n\r\n $scope.$watch('editOrders.orderDetails.ReqDelivDateTime', function (reqDelivDateTimeString, oldReqDelivDateTimeString) {\r\n // OMG using strings instead of Date objects :(...\r\n if (updateCustomerLocationDataLock === 0) {\r\n if (reqDelivDateTimeString !== oldReqDelivDateTimeString &&\r\n !angular.isUndefinedOrNullOrEmpty(oldReqDelivDateTimeString) && !angular.isUndefinedOrNullOrEmpty(reqDelivDateTimeString) &&\r\n angular.isString(oldReqDelivDateTimeString) && angular.isString(reqDelivDateTimeString)) {\r\n var oldReqDelivDateTime = new Date(oldReqDelivDateTimeString.replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n var reqDelivDateTime = new Date(reqDelivDateTimeString.replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n\r\n if (oldReqDelivDateTime.toDateString() !== reqDelivDateTime.toDateString()) {\r\n // user changed date => get equipment list for that date\r\n // we save quantities - so we will be able to merge them with new values, because a lot of items might be the same when you just change a date.\r\n dataBetweenDateChanges = $scope.kendo.ordersGrid.dataSource.data().toJSON().concat($scope.kendo.ordersEquipmentGrid.dataSource.data().toJSON());\r\n $scope.updateCustomerLocationData();\r\n }\r\n }\r\n }\r\n });\r\n\r\n $scope.hasAnyTanks = function () {\r\n return $scope.editOrders.orderDetails.OrderDetails && $scope.editOrders.orderDetails.OrderDetails.length > 0 && !\r\n $scope.hideTankAndEquipment;\r\n };\r\n\r\n $scope.hasAnyEquipment = function () {\r\n return $scope.editOrders.orderDetails.OrderEquipmentDetails && $scope.editOrders.orderDetails.OrderEquipmentDetails.length > 0 && !\r\n $scope.hideTankAndEquipment;\r\n };\r\n })\r\n .controller(\"openOrdersCtrl\", function ($scope, ordersService, templates, localStrings)\r\n {\r\n 'use strict'; \r\n $scope.checkForAppliedProfile();\r\n\r\n if (!$scope.appInfo.webUser.CurrentAuthorization.CanAddEditWebOrders) {\r\n $scope.goTo('Orders/OrderHistory');\r\n }\r\n\r\n function getOpenOrders()\r\n {\r\n ordersService.getOpenOrders($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.OpenOrders))\r\n {\r\n $scope.openOrders = data.OpenOrders;\r\n $scope.kendo.ordersGridInit();\r\n }\r\n else\r\n $scope.notifier.show(localStrings.getLocalizedString(\"SelectionCriteriaNoResults\"), 'warning');\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n }\r\n );\r\n }\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.ordersGrid = {};\r\n $scope.kendo.ordersGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"Number\",\r\n title: localStrings.getLocalizedString(\"Order\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"PONumber\",\r\n title: localStrings.getLocalizedString(\"PONumber\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"LocDescription\",\r\n title: localStrings.getLocalizedString(\"ShipTo\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Contact\",\r\n title: localStrings.getLocalizedString(\"Contact\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"DeliveryDate\",\r\n title: localStrings.getLocalizedString(\"DateTime\"),\r\n width: 130,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Status\",\r\n title: localStrings.getLocalizedString(\"Status\"),\r\n width: 130,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"EnteredBy\",\r\n title: localStrings.getLocalizedString(\"EnteredBy\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.ordersGridInit = function ()\r\n {\r\n $scope.kendo.ordersGridDS = new kendo.data.DataSource({\r\n data: $scope.openOrders,\r\n schema: {\r\n parse: function (response)\r\n {\r\n $.each(response, function (idx, elem)\r\n {\r\n if (elem.DeliveryDate && typeof elem.DeliveryDate === \"string\")\r\n {\r\n elem.DeliveryDate = Date.create(elem.DeliveryDate).format('{MM}/{dd}/{yyyy} {12hr}:{mm} {tt}');\r\n }\r\n });\r\n return response;\r\n }\r\n }\r\n });\r\n\r\n $scope.kendo.ordersGridDS.read();\r\n $scope.kendo.ordersGrid.dataSource.data($scope.kendo.ordersGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n\r\n if (!$scope.appInfo.webUser.CurrentAuthorization.CanAddEditWebOrders)\r\n $scope.goTo('Orders/OrderHistory');\r\n\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.openOrders = $scope.locationInfo.sideMenuData.openOrders || {};\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OrdersSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n\r\n $scope.openOrders = [];\r\n getOpenOrders();\r\n };\r\n\r\n $scope.openOrder = function openOrder(order)\r\n {\r\n switch (order.Status)\r\n {\r\n case 'Pending':\r\n $scope.goTo('Orders/EditOrder/' + order.Key);\r\n break;\r\n\r\n default:\r\n $scope.goTo('Orders/DisplayOrder/' + order.Key);\r\n break;\r\n }\r\n };\r\n })\r\n .controller(\"orderHistoryCtrl\", function ($scope, customerService, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.orders = $scope.locationInfo.sideMenuData.orders || {};\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OrdersSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n };\r\n })\r\n .controller(\"orderHistorySideMenuCtrl\", function ($scope, validatorSvc, customerService, WebFunctions, $filter, reportingService, Authentication, localizationSvc)\r\n {\r\n 'use strict';\r\n // $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.ViewOrderHistoryandPriceNotices))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenuData.orders = {\r\n quotes: \"-1\",\r\n ordered: \"-1\",\r\n dispatched: \"-1\",\r\n delivered: \"-1\",\r\n billed: \"-1\",\r\n fuel: \"-1\",\r\n warehouse: \"-1\",\r\n noninventory: \"-1\",\r\n location: 0,\r\n productSearchText: '',\r\n packageSearchText: '',\r\n orderInvoiceBOLSearchTerm: '',\r\n reportType: 'Orders',\r\n showReportDetail: false\r\n };\r\n $scope.$root.reportSettings.reportKey = 13;\r\n\r\n customerService.getCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, 1).then(function (data)\r\n {\r\n $scope.locations = $filter('filter')(data.Locations, {Active: '!0'});\r\n $scope.locations.unshift({\r\n Active: -1,\r\n Description: localStrings.getLocalizedString(\"All\"),\r\n Key: 0\r\n });\r\n setTimeout(function() {\r\n $scope.locationInfo.sideMenuData.orders.location = 0;\r\n }, 0);\r\n });\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.orders = $scope.reportSettings.saveOptions.orders;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.orders = $scope.locationInfo.sideMenuData.orders;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n\r\n var reportName = $scope.locationInfo.sideMenuData.orders.showReportDetail ?\r\n \"OrdersDetailed\" : $scope.locationInfo.sideMenuData.orders.reportType;\r\n\r\n var qs = \"reportName=\" + reportName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-IncludeStatusOpen=\" + $scope.locationInfo.sideMenuData.orders.quotes +\r\n \"&RP-IncludeStatusOrdered=\" + $scope.locationInfo.sideMenuData.orders.ordered +\r\n \"&RP-IncludeStatusDispatched=\" + $scope.locationInfo.sideMenuData.orders.dispatched +\r\n \"&RP-IncludeStatusDelivered=\" + $scope.locationInfo.sideMenuData.orders.delivered +\r\n \"&RP-IncludeStatusBilled=\" + $scope.locationInfo.sideMenuData.orders.billed +\r\n \"&RP-IncludeTypeFuel=\" + $scope.locationInfo.sideMenuData.orders.fuel +\r\n \"&RP-IncludeTypeWarehouse=\" + $scope.locationInfo.sideMenuData.orders.warehouse +\r\n \"&RP-StartDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-EndDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-ShipToKey=\" + $scope.locationInfo.sideMenuData.orders.location +\r\n \"&RP-ProductSearchTerm=\" + $scope.locationInfo.sideMenuData.orders.productSearchText +\r\n \"&RP-PackageSearchTerm=\" + $scope.locationInfo.sideMenuData.orders.packageSearchText +\r\n \"&RP-IncludeTypeNonInventory=\" + $scope.locationInfo.sideMenuData.orders.noninventory +\r\n \"&RP-OrderInvoiceBOLSearchTerm=\" + $scope.locationInfo.sideMenuData.orders.orderInvoiceBOLSearchTerm;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n\r\n };\r\n })\r\n;","/**\r\n * Created by rhampton on 2/28/14.\r\n */\r\nangular.module('services.httpService', []);","/**\r\n * Created by rhampton on 2/17/2015.\r\n */\r\nangular.module('core.constants', []).factory('constantLists', function(localizationSvc){\r\n var secretQuestions = [];\r\n var phoneTypes = [];\r\n\r\n var getSecretQuestions = function (localStrings) {\r\n if (angular.isUndefinedOrNullOrEmpty(localStrings)) {\r\n localStrings = localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n\r\n if (secretQuestions.length === 0) {\r\n secretQuestions[0] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion1\"));\r\n secretQuestions[1] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion2\"));\r\n secretQuestions[2] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion3\"));\r\n secretQuestions[3] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion4\"));\r\n secretQuestions[4] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion5\"));\r\n secretQuestions[5] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion6\"));\r\n }\r\n\r\n return secretQuestions;\r\n };\r\n\r\n var getPhoneTypes = function (localStrings) {\r\n if (angular.isUndefinedOrNullOrEmpty(localStrings)) {\r\n localStrings = localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n\r\n if (phoneTypes.length === 0) {\r\n phoneTypes[0] = { key: 4, value: localStrings.getLocalizedString(\"Unknown\") };\r\n phoneTypes[1] = { key: 1, value: localStrings.getLocalizedString(\"Home\") };\r\n phoneTypes[2] = { key: 2, value: localStrings.getLocalizedString(\"Mobile\") };\r\n phoneTypes[3] = { key: 3, value: localStrings.getLocalizedString(\"Other\") };\r\n phoneTypes[4] = { key: 0, value: localStrings.getLocalizedString(\"Work\") };\r\n }\r\n\r\n return phoneTypes;\r\n };\r\n return {\r\n secretQuestions: getSecretQuestions,\r\n phoneTypes: getPhoneTypes\r\n };\r\n});\r\n","/* ==============================================================================\r\n\r\nCore Enums\r\n\r\n Contains the core enum related code\r\n\r\n ============================================================================= */\r\nangular.module('core.enums', []).service('Modules', function ()\r\n{\r\n\r\n var All = 'All';\r\n var BulkFuel = 'BulkFuel';\r\n var CardLock = 'CardLock';\r\n var Retail = 'Retail';\r\n var Wholesale = 'Wholesale';\r\n\r\n return {\r\n All: All,\r\n BulkFuel: BulkFuel,\r\n CardLock: CardLock,\r\n Retail: Retail,\r\n Wholesale: Wholesale\r\n };\r\n}).service('WebFunctions', function ()\r\n{\r\n var AccountActivity = 1;\r\n var PaperworkEntry = 2;\r\n var CardTransactions = 3;\r\n var ViewCards = 4;\r\n var EditCards = 5;\r\n var CardAlerts = 6;\r\n var AddNewCards = 7;\r\n var AddandEditWebPaymentAccounts = 8;\r\n var AddandEditWebPayments = 9;\r\n //var ViewCreditBalanceInformation = 10;\r\n var CPPriceNotices = 11;\r\n var ViewCardNumbers = 12;\r\n var ViewNotificationsSenttoOtherContacts = 13;\r\n var ManageContactsAndSecurity = 14;\r\n var ViewCreditInformation = 15;\r\n var ViewOrderHistoryandPriceNotices = 16;\r\n var AddAndEditBulkFuelOrders = 17;\r\n var ViewCustomPages = 18;\r\n return {\r\n AccountActivity: AccountActivity,\r\n PaperworkEntry: PaperworkEntry,\r\n CardTransactions: CardTransactions,\r\n ViewCards: ViewCards,\r\n EditCards: EditCards,\r\n CardAlerts: CardAlerts,\r\n AddNewCards: AddNewCards,\r\n AddandEditWebPaymentAccounts: AddandEditWebPaymentAccounts,\r\n AddandEditWebPayments: AddandEditWebPayments,\r\n //ViewCreditBalanceInformation : ViewCreditBalanceInformation,\r\n CPPriceNotices: CPPriceNotices,\r\n ViewCardNumbers: ViewCardNumbers,\r\n ViewNotificationsSenttoOtherContacts: ViewNotificationsSenttoOtherContacts,\r\n ManageContactsAndSecurity: ManageContactsAndSecurity,\r\n ViewCreditInformation: ViewCreditInformation,\r\n ViewOrderHistoryandPriceNotices: ViewOrderHistoryandPriceNotices,//BulkFuel\r\n AddAndEditBulkFuelOrders: AddAndEditBulkFuelOrders,//BulkFuel\r\n ViewCustomPages: ViewCustomPages\r\n\r\n };\r\n}).service('WebFunctionGroups', function (WebFunctions)\r\n{\r\n var x = WebFunctions;\r\n var All = [x.AccountActivity, x.PaperworkEntry, x.CardTransactions, x.ViewCards, x.EditCards, x.CardAlerts,\r\n x.AddNewCards, x.AddandEditWebPaymentAccounts, x.AddandEditWebPayments, x.ViewCreditInformation,\r\n x.CPPriceNotices, x.ViewCardNumbers, x.ViewNotificationsSenttoOtherContacts, x.ManageContactsAndSecurity,\r\n x.ViewOrderHistoryandPriceNotices, x.AddAndEditBulkFuelOrders];\r\n var Account = [x.AccountActivity, x.CardTransactions, x.AddandEditWebPaymentAccounts, x.AddandEditWebPayments];\r\n var Payments = [x.AddandEditWebPaymentAccounts, x.AddandEditWebPayments];\r\n var Orders = [/*x.AccountActivity,*/ x.ViewOrderHistoryandPriceNotices, x.AddAndEditBulkFuelOrders];//BulkFuel && Warehouse\r\n var Paperwork = [x.PaperworkEntry];\r\n var FuelCards = [x.CardTransactions, x.ViewCards, x.EditCards, x.CardAlerts, x.AddNewCards, x.CPPriceNotices];\r\n var Comments = All;\r\n var Documents = All;\r\n var AccountReports = [x.AccountActivity];\r\n var AccountPayments = [x.AddandEditWebPaymentAccounts, x.AddandEditWebPayments];\r\n var AccountAlerts = [x.AddandEditWebPayments];\r\n var FuelCardsCards = [x.ViewCards, x.EditCards, x.AddNewCards];\r\n var FuelCardsTrans = [x.CardTransactions];\r\n var FuelCardsPrices = [x.CPPriceNotices];\r\n var CustomPages = [x.ViewCustomPages];\r\n return {\r\n All: All,\r\n Account: Account,\r\n Orders: Orders,\r\n Paperwork: Paperwork,\r\n Payments: Payments,\r\n FuelCards: FuelCards,\r\n Comments: Comments,\r\n Documents: Documents,\r\n AccountReports: AccountReports,\r\n AccountPayments: AccountPayments,\r\n AccountAlerts: AccountAlerts,\r\n FuelCardsCards: FuelCardsCards,\r\n FuelCardsTrans: FuelCardsTrans,\r\n FuelCardsPrices: FuelCardsPrices,\r\n CustomPages: CustomPages\r\n };\r\n}).service('WebFunctionModules', function (WebFunctions)\r\n{\r\n return {\r\n checkWebFunctionModules: function (webFunction, isBulkFuel, isCardLock, isRetail, isWholesale, isWebEft, customer)\r\n {\r\n if (webFunction === WebFunctions.CardTransactions) return isCardLock;\r\n if (webFunction === WebFunctions.ViewCards) return isCardLock;\r\n if (webFunction === WebFunctions.EditCards) return isCardLock;\r\n if (webFunction === WebFunctions.CardAlerts) return isCardLock;\r\n if (webFunction === WebFunctions.AddNewCards) return isCardLock;\r\n if (webFunction === WebFunctions.AddandEditWebPaymentAccounts) return isWebEft;\r\n if (webFunction === WebFunctions.AddandEditWebPayments) return isWebEft;\r\n if (webFunction === WebFunctions.CPPriceNotices) return isCardLock && (customer.CPPrcNtcRuleKey !== null && customer.CPPrcNtcRuleKey > 0);\r\n if (webFunction === WebFunctions.ViewCardNumbers) return isCardLock;\r\n if (webFunction === WebFunctions.ViewOrderHistoryandPriceNotices) return (isBulkFuel || isWholesale);\r\n if (webFunction === WebFunctions.AddAndEditBulkFuelOrders) return (isBulkFuel || isWholesale);\r\n //for all other web functions assume that any module access is fine.\r\n return true;\r\n }\r\n };\r\n});","\r\n\r\n/* ==============================================================================\r\n\r\n CORE.ERROR MODULE\r\n\r\n Defines the error module and it all it's module dependencies\r\n\r\n ============================================================================= */\r\nangular.module('core.error', []);\r\n\r\n\r\n\r\n/* ==============================================================================\r\n\r\n CORE.ERROR SERVICE\r\n\r\n Contains helpful error handling and publishing methods\r\n\r\n ============================================================================= */\r\nangular.module('core.error').factory('NotificationService', function ($rootScope) {\r\n 'use strict';\r\n function handle(event, settings, opResults, status, headers, config) {\r\n var data = {\r\n settings: settings,\r\n opResults: opResults,\r\n status: status,\r\n headers: headers,\r\n config: config\r\n };\r\n $rootScope.$broadcast('event:' + event, data);\r\n }\r\n return {\r\n handleError: function (settings, opResults, status, headers, config) {\r\n handle('Error', settings, opResults, status, headers, config);\r\n },\r\n handleFailure: function (settings, opResults, status, headers, config) {\r\n handle('Failed', settings, opResults, status, headers, config);\r\n },\r\n handleSuccess: function (settings, opResults, status, headers, config) {\r\n handle('Success', settings, opResults, status, headers, config);\r\n }\r\n };\r\n});","angular.module('core.objects', [])\r\n .factory(\"Payment\",function(HttpUtil){\r\n 'use strict';\r\n var paymentInfo = {};\r\n return {\r\n paymentInfo : paymentInfo\r\n };\r\n })\r\n .factory(\"HttpUtil\",function($http, $q){\r\n 'use strict';\r\n return {};\r\n });","/* ==============================================================================\r\n\r\n CORE.SECURITY MODULE\r\n\r\n Contains all security related code\r\n\r\n ============================================================================= */\r\nangular.module('core.security', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n AUTH INTERCEPTOR\r\n\r\n Adds the Auth Token to the Http headers collection\r\n if the token is present.\r\n\r\n ============================================================================= */\r\nangular.module('core.security').factory('AuthInterceptor', function ($q, $rootScope, $location, $interval)\r\n{\r\n function logout()\r\n {\r\n $rootScope.sessionExpired = true;\r\n }\r\n\r\n return {\r\n\r\n request: function (config)\r\n {\r\n $interval.cancel($rootScope.sessionTimeout);\r\n config.headers = config.headers || {};\r\n\r\n // If the auth token is present\r\n if (amplify.store('pnuser-token') !== undefined)\r\n {\r\n // Add it to the http headers collection to be read by our\r\n // server-side authentication code\r\n var token = amplify.store('pnuser-token');\r\n config.headers.Authentication = token;\r\n //Update expiration time for the user token\r\n amplify.store('pnuser-token', token, {expires: $rootScope.timeout});\r\n if ($rootScope.timeout > 0)\r\n {\r\n $rootScope.sessionTimeout = $interval(function ()\r\n {\r\n logout();\r\n }, $rootScope.timeout);\r\n }\r\n } else\r\n {\r\n if ($location.$$path !== \"/\" &&\r\n $location.$$path.search(/(SignUp|ResetPassword|SetPassword|ContactUs|SiteDisabled|unsubscribe)/i) === -1)\r\n logout();\r\n }\r\n\r\n return config || $q.when(config);\r\n }\r\n\r\n };\r\n\r\n});\r\n\r\n/* ==============================================================================\r\n\r\n AUTHENTICATION SERVICE\r\n\r\n Contains the core authentication related code\r\n\r\n ============================================================================= */\r\nangular.module('core.security').factory('Authentication', function ($q, $rootScope, apiService, $location, $analytics)\r\n{\r\n\r\n return {\r\n isAuthenticated: function ()\r\n {\r\n var deferred = $q.defer(),\r\n token = amplify.store('pnuser-token');\r\n\r\n if (token === undefined)\r\n {\r\n $rootScope.isAuthenticated = false;\r\n deferred.reject('authentication:auth-token not valid');\r\n }\r\n else\r\n {\r\n $rootScope.isAuthenticated = true;\r\n deferred.resolve('authentication:auth-token is valid');\r\n }\r\n return deferred.promise;\r\n },\r\n login: function (userId, password, impersonationGuid)\r\n {\r\n var deferred = $q.defer();\r\n var data = {\r\n \"WebUserId\": userId || '',\r\n \"WebUserPassword\": password || '',\r\n 'ImpersonationGuid': impersonationGuid || ''\r\n };\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/Login',\r\n data: data\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n $rootScope.loginInfo.userId = data.Data.ImpersonatedUserId;\r\n $rootScope.loginInfo.userKey = data.Data.ImpersonatedKey;\r\n $rootScope.loginInfo.userType = data.Data.ImpersonatedType;\r\n $rootScope.loginInfo.impersonatorUserId = data.Data.ImpersonatorUserId;\r\n $rootScope.loginInfo.impersonatorUserKey = data.Data.ImpersonatorKey;\r\n $rootScope.loginInfo.impersonatorUserType = data.Data.ImpersonatorType;\r\n\r\n // Create Google Analytics Login event with Web User Key\r\n $analytics.eventTrack('Successful Login', { category: 'User Access', label: data.Data.Key });\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n // Create Google Analytics Login event with Web User Key\r\n $analytics.eventTrack('Failed Login', { category: 'User Access', label: data.Errors[0] || 'Valid login credentials required' });\r\n deferred.reject(data.ErrorMessages);\r\n }\r\n );\r\n \r\n return deferred.promise;\r\n },\r\n userToken: function ()\r\n {\r\n if (amplify.store('pnuser-token') !== undefined)\r\n {\r\n return amplify.store('pnuser-token');\r\n } else\r\n {\r\n $location.path('/');\r\n }\r\n }\r\n };\r\n});\r\n\r\n/* ==============================================================================\r\n\r\n USER SERVICE\r\n\r\n Contains the core USER related code\r\n\r\n ============================================================================= */\r\nangular.module('core.security')\r\n .factory('WebUserSvc', function ($q, $rootScope, Authentication, apiService)\r\n {\r\n var webUser;\r\n\r\n function removeEmptySiteMenuEntries(data)\r\n {\r\n if (!data.Data.WebUser || !data.Data.WebUser.CurrentAuthorization || !data.Data.WebUser.CurrentAuthorization.SiteLayout)\r\n {\r\n return;\r\n }\r\n\r\n data.Data.WebUser.CurrentAuthorization.SiteLayout.SubMenu.remove(function (menu)\r\n {\r\n return !data.Data.WebUser.CurrentAuthorization.SiteLayout.SideMenu.any({ParentKey:menu.Key});\r\n });\r\n }\r\n\r\n function retrieveWebUserFromAPI(user)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetWebUser/' + user,\r\n params: {}\r\n });\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n removeEmptySiteMenuEntries(data);\r\n webUser = data.Data.WebUser;\r\n deferred.resolve(webUser);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n\r\n function retrieveWebUserFromAPIWithToken(token, profile) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetWebUserByToken/',\r\n data: {\r\n ProfileKey: profile,\r\n Token: token\r\n }\r\n });\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n removeEmptySiteMenuEntries(data);\r\n webUser = data.Data.WebUser;\r\n deferred.resolve(webUser);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n\r\n function retrieveSelectedProfileFromAPI(user, profile)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetWebUserAndProfile/' + user + '/' + profile,\r\n params: {}\r\n });\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n removeEmptySiteMenuEntries(data);\r\n webUser = data.Data.WebUser;\r\n deferred.resolve(webUser);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n\r\n function getWebUser()\r\n {\r\n return webUser;\r\n }\r\n\r\n return {\r\n getLoggedInWebUserToken: function ()\r\n {\r\n var token = amplify.store('pnuser-token');\r\n\r\n if (token === undefined)\r\n {\r\n $rootScope.isAuthenticated = false;\r\n return;\r\n }\r\n $rootScope.isAuthenticated = true;\r\n \r\n return token;\r\n },\r\n getWebUserProfile: function () {\r\n return amplify.store('pnWebProfile');\r\n },\r\n getCurrentAuthorization: function () {\r\n return amplify.store('pnAuthIndex');\r\n },\r\n retrieveWebUser: function (user)\r\n {\r\n var deferred = $q.defer();\r\n retrieveWebUserFromAPI(user).then(function (data) {\r\n deferred.resolve(data);\r\n });\r\n return deferred.promise;\r\n },\r\n retrieveWebUserData: function (token, profile) {\r\n var deferred = $q.defer();\r\n retrieveWebUserFromAPIWithToken(token, profile).then(function (data) {\r\n deferred.resolve(data);\r\n });\r\n return deferred.promise;\r\n },\r\n retrieveWebUserFromAPI: retrieveWebUserFromAPI,\r\n retrieveWebUserFromAPIWithToken: retrieveWebUserFromAPIWithToken,\r\n retrieveSelectedProfile: function (user, profile)\r\n {\r\n var deferred = $q.defer();\r\n retrieveSelectedProfileFromAPI(user, profile).then(function (data) {\r\n deferred.resolve(data);\r\n });\r\n return deferred.promise;\r\n },\r\n getWebUserForSignup: function (webUser)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetWebUserForSignup/' + webUser.GUID,\r\n params: {}\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n signupWebUser: function (webUser)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SignupWebUser/',\r\n data: webUser\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getWebUserForPasswordReset: function (webUser)\r\n {\r\n var deferred = $q.defer(webUser);\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetWebUserForPasswordReset/' + webUser.GUID,\r\n params: {}\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n verifyWebUserSecretQuestionAnswer: function (webUser)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/VerifyWebUserSecretQuestionAnswer/' + webUser.GUID + '/' + webUser.AnswerClear,\r\n params: {}\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n resetWebUserPassword: function (webUser)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/ResetWebUserPassword/',\r\n data: webUser\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n webUser = data.Data;\r\n deferred.resolve(webUser);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n processForgotMyPassword: function (email)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/ProcessWebUserResetPassword/',\r\n params: {\r\n webUserId: email\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.ErrorMessages);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n saveWebUser: function (webUser, quiet)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveWebUser/',\r\n data: webUser\r\n }\r\n );\r\n if (quiet)\r\n {\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n webUser = data.Data.WebUser;\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n } else\r\n {\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n webUser = data.Data.WebUser;\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n }\r\n return deferred.promise;\r\n },\r\n validatePasswordComplexity: function (webUserKey, password, isLogin)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/ValidatePasswordComplexity/',\r\n data: {\r\n WebUserKey: webUserKey,\r\n Password: password,\r\n IsLogin: isLogin,\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.resolve(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getNextPasswordResetDate: function (webUser)\r\n {\r\n var one_day = 1000 * 60 * 60 * 24;\r\n // Convert both dates to milliseconds\r\n var date1_ms = new Date(Date.parse(webUser.PWCreatedDate));\r\n var date2_ms = new Date().getTime();\r\n var difference_ms = date1_ms - date2_ms;\r\n return Math.round(difference_ms / one_day);\r\n },\r\n getWebUser: getWebUser,\r\n resolveWebUser: function () {\r\n var deferred = $q.defer();\r\n var _user = this.getWebUser();\r\n var _token = this.getLoggedInWebUserToken();\r\n var _profile = this.getWebUserProfile();\r\n\r\n // We have the user already\r\n if (!angular.isUndefinedOrNullOrEmpty(_user)) deferred.resolve();\r\n\r\n // Get the user if we can\r\n else if (!angular.isUndefinedOrNullOrEmpty(_token) && !angular.isUndefinedOrNullOrEmpty(_profile))\r\n this.retrieveWebUserData(_token, _profile).then(function () { deferred.resolve(); });\r\n\r\n // User is not able to be retrieved\r\n else deferred.resolve();\r\n\r\n return deferred.promise;\r\n }\r\n };\r\n }\r\n);","/**\r\n * Created by rhampton on 6/17/2014.\r\n */\r\n\r\n\r\n/* ==============================================================================\r\n\r\n CORE.DIRECTIVES MODULE\r\n\r\n Defines the module namespace for the core.directives\r\n\r\n ============================================================================= */\r\nangular.module('core.directives', []);\r\n\r\n/* ==============================================================================\r\n\r\n Modal Dialog\r\n\r\n Shows and hides a modal dialog centered on the page.\r\n\r\n ============================================================================= */\r\nangular.module('core.directives')\r\n .directive('modalDialog', function ($rootScope)\r\n {\r\n return {\r\n restrict: 'E',\r\n scope: {\r\n show: '=',\r\n closeDialog: '&',\r\n closeText: '@',\r\n autoClose: '@'\r\n },\r\n replace: true, // Replace with the template below\r\n transclude: true, // we want to insert custom content inside the directive\r\n link: function (scope, element, attrs)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(attrs.autoClose))\r\n {\r\n attrs.autoClose = true;\r\n } else\r\n {\r\n attrs.autoClose = scope.$eval(attrs.autoClose);\r\n }\r\n\r\n scope.dialogStyle = {};\r\n if (attrs.width)\r\n scope.dialogStyle.width = attrs.width;\r\n if (attrs.height)\r\n scope.dialogStyle.height = attrs.height;\r\n\r\n\r\n },\r\n controller: function ($scope, $element, $attrs)\r\n {\r\n\r\n $scope.hideModal = function (source)\r\n {\r\n if ((source === 1) && (!$attrs.autoClose))\r\n {\r\n return;\r\n } // if clicked outside of modal and autoClose is set to false then don't close modal\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.closeDialog()))\r\n {\r\n $scope.closeDialog();\r\n }\r\n\r\n $scope.show = false;\r\n };\r\n },\r\n template: \"
    \"\r\n };\r\n })\r\n .directive('parseInt', [function ()\r\n {\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: function (scope, elem, attrs, controller)\r\n {\r\n controller.$formatters.push(function (modelValue)\r\n {\r\n return '' + modelValue;\r\n });\r\n\r\n controller.$parsers.push(function (viewValue)\r\n {\r\n return parseInt(viewValue, 10);\r\n });\r\n }\r\n };\r\n }])\r\n .directive('parseFloat', [function ()\r\n {\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: function (scope, elem, attrs, controller)\r\n {\r\n controller.$formatters.push(function (modelValue)\r\n {\r\n return '' + modelValue;\r\n });\r\n\r\n controller.$parsers.push(function (viewValue)\r\n {\r\n return parseFloat(viewValue);\r\n });\r\n }\r\n };\r\n }])\r\n .directive('parseDate', function ()\r\n {\r\n return {\r\n require: 'ngModel',\r\n link: function (scope, element, attr, ngModelCtrl)\r\n {\r\n function fromUser(text)\r\n {\r\n var transformedInput = text.replace(/[^0-9/]/, '');\r\n if (transformedInput !== text)\r\n {\r\n ngModelCtrl.$setViewValue(transformedInput);\r\n ngModelCtrl.$render();\r\n }\r\n return transformedInput;\r\n }\r\n\r\n ngModelCtrl.$parsers.push(fromUser);\r\n }\r\n };\r\n })\r\n .directive('dynamicHtml', function ($compile)\r\n {\r\n return {\r\n restrict: 'A',\r\n replace: true,\r\n link: function (scope, ele, attrs)\r\n {\r\n scope.$watch(attrs.dynamic, function (html)\r\n {\r\n ele.html(html);\r\n $compile(ele.contents())(scope);\r\n });\r\n }\r\n };\r\n })\r\n .directive('money', function ($filter)\r\n {\r\n 'use strict';\r\n var NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))\\s*$/;\r\n\r\n function link(scope, el, attrs, ngModelCtrl)\r\n {\r\n var min = parseFloat(attrs.min || 0);\r\n var precision = parseFloat(attrs.precision || 2);\r\n var symbol = attrs.symbol || '';\r\n var lastValidValue;\r\n\r\n function unFormatNumber(number)\r\n {\r\n number += '';\r\n\r\n if (number.toString().indexOf(',') > -1)\r\n {\r\n number = number.replace(/,/g, \"\");\r\n }\r\n if (number.toString().indexOf('$') > -1)\r\n {\r\n number = number.replace(/\\$/g, \"\");\r\n }\r\n if (number.length === 0)// || isNaN(number))\r\n return \"0\";\r\n return number;\r\n }\r\n\r\n function formatViewValue(value)\r\n {\r\n value = unFormatNumber(value);\r\n value = ngModelCtrl.$isEmpty(value) ? '' : '' + symbol + formatNumber(value, precision);\r\n lastValidValue = value;\r\n return value;\r\n }\r\n\r\n ngModelCtrl.$formatters.push(formatViewValue);\r\n\r\n function formatNumber(val, decimalPlaces)\r\n {\r\n val = unFormatNumber(val);\r\n val = parseFloat(val).toFixed(decimalPlaces);\r\n val = addCommas(val);\r\n return val;\r\n }\r\n\r\n function addCommas(nStr)\r\n {\r\n nStr += '';\r\n var x = nStr.split('.');\r\n var x1 = x[0];\r\n var x2 = x.length > 1 ? '.' + x[1] : '';\r\n var rgx = /(\\d+)(\\d{3})/;\r\n while (rgx.test(x1))\r\n {\r\n x1 = x1.replace(rgx, '$1' + ',' + '$2');\r\n }\r\n return x1 + x2;\r\n }\r\n\r\n ngModelCtrl.$parsers.push(function (value)\r\n {\r\n value = unFormatNumber(value);\r\n if (angular.isUndefined(value))\r\n {\r\n value = '';\r\n }\r\n // value = unFormatNumber(value);\r\n // Handle leading decimal point, like \".5\"\r\n if (value.indexOf('.') === 0)\r\n {\r\n value = '0' + value;\r\n }\r\n\r\n // Allow \"-\" inputs only when min < 0\r\n if (value.indexOf('-') === 0)\r\n {\r\n if (min >= 0)\r\n {\r\n value = null;\r\n ngModelCtrl.$setViewValue('');\r\n ngModelCtrl.$render();\r\n } else if (value === '-')\r\n {\r\n value = '';\r\n }\r\n }\r\n\r\n var empty = ngModelCtrl.$isEmpty(value);\r\n if (empty || NUMBER_REGEXP.test(value))\r\n {\r\n lastValidValue = (value === '') ? null : (empty ? value : parseFloat(value));\r\n } else\r\n {\r\n // Render the last valid input in the field\r\n ngModelCtrl.$setViewValue(formatViewValue(lastValidValue));\r\n ngModelCtrl.$render();\r\n }\r\n\r\n ngModelCtrl.$setValidity('number', true);\r\n return lastValidValue;\r\n });\r\n\r\n function applyFormat()\r\n {\r\n var value = unFormatNumber(ngModelCtrl.$modelValue);\r\n if (!isNaN(value))\r\n {\r\n ngModelCtrl.$viewValue = formatViewValue(value);\r\n lastValidValue = ngModelCtrl.$viewValue;\r\n ngModelCtrl.$render();\r\n }\r\n }\r\n\r\n el.bind('blur', applyFormat);\r\n el.bind('change', applyFormat);\r\n\r\n return applyFormat();\r\n }\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: link\r\n };\r\n })\r\n .directive('customAutofocus', function ()\r\n {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs)\r\n {\r\n scope.$watch(function ()\r\n {\r\n return scope.$eval(attrs.customAutofocus);\r\n }, function (newValue)\r\n {\r\n if (newValue === true)\r\n {\r\n element[0].select();\r\n element[0].focus();\r\n //use focus function instead of autofocus attribute to avoid cross browser problem.\r\n // And autofocus should only be used to mark an element to be focused when page loads.\r\n }\r\n });\r\n }\r\n };\r\n })\r\n .directive(\"toolTips\", function ($compile)\r\n {\r\n var clone = $compile('
    {{text}}
    ');\r\n\r\n function link(scope, el, attr)\r\n {\r\n if (scope.text && scope.text.length > 0)\r\n {\r\n el.qtip({\r\n position: {\r\n at: \"right middle\"\r\n },\r\n style: {\r\n tip: {\r\n corner: \"left top\"\r\n },\r\n classes: \"toolTipStyle\"\r\n },\r\n content: {\r\n text: function ()\r\n {\r\n return scope.$apply(function ()\r\n {\r\n return clone(scope);\r\n });\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n return {\r\n restrict: 'A',\r\n link: link,\r\n scope: {\r\n text: \"=toolTips\"\r\n }\r\n };\r\n })\r\n .directive('strength', ['$parse', function ($parse)\r\n {\r\n return {\r\n require: 'ngModel',\r\n restrict: 'A',\r\n scope: {\r\n passwordComplexity: \"=\",\r\n passwordMeterScore: \"=\"\r\n },\r\n link: function (scope, elem, attrs, ctrl)\r\n {\r\n ctrl.$parsers.unshift(function (viewValue)\r\n {\r\n var pwdValidLength, pwdHasLetter, pwdHasNumber, pwdHasSpecial;\r\n\r\n if (scope.passwordComplexity.EnforcePasswordComplexity)\r\n {\r\n pwdValidLength = (viewValue && viewValue.length >= scope.passwordComplexity.PasswordMinLength ? true : false);\r\n pwdHasLetter = (viewValue && (viewValue.match(/[A-Z]/g) && viewValue.match(/[A-Z]/g).length >= scope.passwordComplexity.PasswordMinUpperCase)) ? true : false;\r\n pwdHasNumber = (viewValue && (viewValue.match(/\\d/g) && viewValue.match(/\\d/g).length >= scope.passwordComplexity.PasswordMinNumbers)) ? true : false;\r\n pwdHasSpecial = (viewValue && (viewValue.match(/[^a-zA-Z0-9]/g) && viewValue.match(/[^a-zA-Z0-9]/g).length >= scope.passwordComplexity.PasswordMinUpperCase)) ? true : false;\r\n\r\n } else\r\n {\r\n pwdValidLength = (viewValue && viewValue.length >= 7 ? true : false);\r\n pwdHasLetter = (viewValue && /[A-Z]/.test(viewValue)) ? true : false;\r\n pwdHasNumber = (viewValue && /\\d/.test(viewValue)) ? true : false;\r\n pwdHasSpecial = (viewValue && /[^a-zA-Z0-9]/.test(viewValue)) ? true : false;\r\n }\r\n\r\n var score = +(viewValue.length) +\r\n (/[A-Z]/.test(viewValue) ? 1 : 0 ) +\r\n (/[a-z]/.test(viewValue) ? 1 : 0 ) +\r\n (/\\d/.test(viewValue) ? 1 : 0) +\r\n (/[^a-zA-Z0-9]/.test(viewValue) ? 1 : 0);\r\n\r\n var total = viewValue.length > 7 ? viewValue.length + 4 : 11;\r\n scope.passwordMeterScore = score / total;\r\n\r\n if (pwdValidLength && pwdHasLetter && pwdHasNumber && pwdHasSpecial)\r\n {\r\n ctrl.$setValidity('pwd', true);\r\n } else\r\n {\r\n ctrl.$setValidity('pwd', false);\r\n }\r\n return viewValue;\r\n });\r\n }\r\n };\r\n }])\r\n .directive('match', ['$parse', function ($parse)\r\n {\r\n return {\r\n require: 'ngModel',\r\n restrict: 'A',\r\n link: function (scope, elem, attrs, ctrl)\r\n {\r\n scope.$watch(function ()\r\n {\r\n return (ctrl.$pristine && angular.isUndefined(ctrl.$modelValue)) || $parse(attrs.match)(scope) === ctrl.$modelValue;\r\n }, function (currentValue)\r\n {\r\n ctrl.$setValidity('match', currentValue);\r\n });\r\n }\r\n };\r\n }])\r\n .directive('imageSlider', ['$interval', '$timeout', function ($interval, $timeout)\r\n {\r\n return {\r\n restrict: 'E',\r\n scope: {\r\n imageArray: '='\r\n },\r\n template: \"
    \",\r\n link: function (scope, elem, attrs, ctrl)\r\n {\r\n var start,\r\n stop,\r\n advance;\r\n\r\n // reverse thru the array and remove non-active images\r\n for (var i = scope.imageArray.length - 1; i >= 0; i--)\r\n {\r\n if (!scope.imageArray[i].Active)\r\n scope.imageArray.splice(i, 1);\r\n }\r\n\r\n scope.slider = {\"index\": 0};\r\n\r\n start = function ()\r\n {\r\n if (advance)\r\n return;\r\n\r\n advance = $interval(function ()\r\n {\r\n if (scope.slider.index === scope.imageArray.length - 1)\r\n scope.slider.index = 0;\r\n else\r\n ++scope.slider.index;\r\n }, 7000);\r\n };\r\n\r\n start();\r\n\r\n stop = function ()\r\n {\r\n if (advance)\r\n {\r\n $interval.cancel(advance);\r\n advance = undefined;\r\n }\r\n };\r\n\r\n scope.getPrevImage = function (index)\r\n {\r\n scope.pauseAutoAdvance();\r\n if (index === 0)\r\n scope.slider.index = scope.imageArray.length - 1;\r\n else\r\n scope.slider.index = index - 1;\r\n };\r\n\r\n scope.getNextImage = function (index)\r\n {\r\n scope.pauseAutoAdvance();\r\n if (index === scope.imageArray.length - 1)\r\n scope.slider.index = 0;\r\n else\r\n scope.slider.index = index + 1;\r\n };\r\n\r\n scope.pauseAutoAdvance = function ()\r\n {\r\n if (advance)\r\n {\r\n stop();\r\n $timeout(start, 20000);\r\n }\r\n };\r\n\r\n scope.$on('$destroy', function ()\r\n {\r\n stop();\r\n }\r\n );\r\n\r\n }\r\n };\r\n }])\r\n .directive('alphaNumeric', function ()\r\n {\r\n return {\r\n require: 'ngModel',\r\n link: function (scope, element, attrs, modelCtrl)\r\n {\r\n modelCtrl.$parsers.push(function (inputValue)\r\n {\r\n // this next if is necessary for when using ng-required on your input.\r\n // In such cases, when a letter is typed first, this parser will be called\r\n // again, and the 2nd time, the value will be undefined\r\n if (inputValue === undefined) return '';\r\n var transformedInput = attrs.alphaNumeric === '0' ? inputValue.replace(/[^0-9]/g, '') : inputValue.replace(/[^a-zA-Z0-9]/g, '');\r\n if (transformedInput !== inputValue)\r\n {\r\n modelCtrl.$setViewValue(transformedInput);\r\n modelCtrl.$render();\r\n }\r\n\r\n return transformedInput;\r\n });\r\n }\r\n };\r\n })\r\n .directive('autoresize', function ($window)\r\n {\r\n return function ($scope)\r\n {\r\n $scope.initializeWindowSize = function ()\r\n {\r\n $scope.maxHeight = Math.max(\r\n document.body.scrollHeight, document.documentElement.scrollHeight,\r\n document.body.offsetHeight, document.documentElement.offsetHeight,\r\n document.body.clientHeight, document.documentElement.clientHeight,\r\n window.innerHeight\r\n );\r\n $scope.windowHeight = $window.innerHeight;\r\n return $scope.windowWidth = $window.innerWidth;\r\n };\r\n $scope.initializeWindowSize();\r\n $scope.$watch('__height', function (newHeight, oldHeight)\r\n {\r\n $scope.initializeWindowSize();\r\n });\r\n return angular.element($window).bind('resize', function ()\r\n {\r\n $scope.initializeWindowSize();\r\n return $scope.$apply();\r\n });\r\n };\r\n })\r\n .directive('customContent', function ($compile)\r\n {\r\n return function (scope, el, attrs)\r\n {\r\n el.replaceWith($compile(attrs.html)(scope));\r\n };\r\n })\r\n .directive('onCloseFn', function ()\r\n {\r\n /*\r\n on-close-fn=\"myClosingActions()\"\r\n on-close-message='Thanks for visiting out site.'\r\n\r\n $scope.myClosingActions returns: true to display the stock browser 'Leaving Page' with your message,\r\n false displays nothing\r\n */\r\n return {\r\n scope: {\r\n onCloseFn: '&',\r\n onCloseMessage: '@'\r\n },\r\n link: function ($scope, elem, attrs)\r\n {\r\n window.onbeforeunload = function ()\r\n {\r\n if ($scope.onCloseFn())\r\n {\r\n return $scope.onCloseMessage || ' ';\r\n }\r\n };\r\n\r\n $scope.$on('$destroy', function ()\r\n {\r\n window.onbeforeunload = null;\r\n });\r\n }\r\n };\r\n })\r\n .directive('onLeaveFn', function ()\r\n {\r\n /*\r\n on-leave-fn=\"myClosingActions()\"\r\n on-leave-message='You have unsaved changes. Leaving the page will result in data lose.'\r\n\r\n $scope.myClosingActions returns: true to display the stock browser 'Leaving Page' with your message,\r\n false displays nothing\r\n */\r\n return {\r\n scope: {\r\n onLeaveIfFn: '&',\r\n onLeaveMessage: '@'\r\n },\r\n link: function ($scope, elem, attrs)\r\n {\r\n\r\n var $locationChangeStartUnbind = $scope.$on('$locationChangeStart', function (event, next, current)\r\n {\r\n if ($scope.onLeaveIfFn())\r\n {\r\n if (!confirm($scope.onLeaveMessage || 'Leave this page?'))\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n });\r\n\r\n $scope.$on('$destroy', function ()\r\n {\r\n $locationChangeStartUnbind();\r\n });\r\n }\r\n };\r\n })\r\n .directive('promptToSave', ['$timeout', function ($timeout)\r\n {\r\n return {\r\n link: function ($scope, elem, attrs, ctrl)\r\n {\r\n var menu = $scope.locationInfo.menuLocation,\r\n subMenu = $scope.locationInfo.subMenuLocation,\r\n sideMenu = $scope.locationInfo.sideMenuData.subMenu;\r\n\r\n $scope.$cancelPromptToSave = $scope.$on('$locationChangeStart', function (event, next, current)\r\n {\r\n var result = elem.find(\".ng-dirty:not(form)\").length + elem.find(\".k-dirty-cell\").length + elem.find(\".k-dirty\").length;\r\n\r\n if (result > 0)\r\n {\r\n var confirmPopUpText = \"This page may have unsaved changes.\\n\\nContinue without saving?\";\r\n if ($scope.localizationFilesInitialized)\r\n {\r\n var localizedString = $scope.pnLocalizationCtrl.localizations.getCachedLocalizationsContainer(\"AppLocalization\");\r\n confirmPopUpText = localizedString.stringFromCharacterEntity(localizedString.getLocalizedString(\"UnsavedChanges\") + \"\\n\\n\" + localizedString.getLocalizedString(\"ContinueWithoutSaving\"));\r\n }\r\n\r\n var response = confirm(confirmPopUpText);\r\n\r\n if (!response)\r\n {\r\n event.preventDefault();\r\n $scope.locationInfo.menuLocation = menu;\r\n $scope.locationInfo.subMenuLocation = subMenu;\r\n if ($scope.locationInfo.sideMenuData.pendingNav)\r\n $timeout.cancel($scope.locationInfo.sideMenuData.pendingNav);\r\n $scope.locationInfo.sideMenuData.subMenu = sideMenu;\r\n }\r\n }\r\n });\r\n\r\n $scope.$on('$destroy', function ()\r\n {\r\n $scope.$cancelPromptToSave();\r\n });\r\n }\r\n };\r\n }])\r\n .directive('processingOverlay', function ($rootScope, $window, $timeout)\r\n {\r\n return {\r\n restrict: 'EA',\r\n replace: true,\r\n link: function (scope, element, attrs)\r\n {\r\n var overlayContainer = document.getElementById('processingOverlay');\r\n overlayContainer.style.width = '994px';\r\n\r\n var mainContent = document.getElementsByClassName(\"main-content\")[0];\r\n\r\n $rootScope.$watch('mainContent.clientHeight', function ()\r\n {\r\n setHeight();\r\n });\r\n\r\n $rootScope.$watch('showLoader', function (show)\r\n {\r\n if (show)\r\n {\r\n overlayContainer.style.display = 'block';\r\n $timeout(function ()\r\n {\r\n setHeight();\r\n });\r\n }\r\n else\r\n {\r\n overlayContainer.style.display = 'none';\r\n }\r\n });\r\n\r\n function setHeight()\r\n {\r\n $(\"#processingOverlay\").height(mainContent.clientHeight);\r\n }\r\n },\r\n template: '
    '\r\n\r\n\r\n };\r\n })\r\n .directive('postRender', ['$timeout', function ($timeout) {\r\n // Use this directive when you need to reliably call a function after the element renders\r\n return {\r\n scope: {\r\n postRender: '&'\r\n },\r\n restrict: 'A',\r\n terminal: true,\r\n transclude: true,\r\n link: function (scope, element, attrs) {\r\n $timeout(scope.postRender, 0);\r\n }\r\n };\r\n }])\r\n;","\r\nangular.module('pdi.extensions', [])\r\n .factory('dateTimeFormatPatterns', function() {\r\n 'use strict';\r\n\r\n function formatForCulture(type, formatType) {\r\n\r\n var formatStr = '';\r\n\r\n if (formatType === 1) //kendo\r\n {\r\n if (type === 0) { //date\r\n\r\n formatStr = \"mm/dd/yyyy\";\r\n\r\n } else if (type === 1) { //time\r\n\r\n formatStr = \"hh:mm t\";\r\n\r\n } else { //date and time\r\n\r\n formatStr = \"mm/dd/yyyy hh:mm t\";\r\n }\r\n } else if (formatType === 2) { //input mask\r\n if (type === 0) { //date\r\n\r\n formatStr = \"m/d/yyyy\";\r\n\r\n } else if (type === 1) { //time\r\n\r\n formatStr = \"hh:mm t\";\r\n\r\n } else { //date and time\r\n\r\n formatStr = \"datetime12us\";\r\n }\r\n } else {\r\n if (type === 0) { //date\r\n\r\n formatStr = \"MM/dd/yyyy\";\r\n\r\n } else if (type === 1) { //time\r\n\r\n formatStr = \"HH:mm a\";\r\n\r\n } else { //date and time\r\n\r\n formatStr = \"MM/dd/yyyy hh:mm a\";\r\n }\r\n\r\n }\r\n\r\n return formatStr;\r\n }\r\n\r\n return {\r\n kendoDateFormat: formatForCulture(0, 1),\r\n kendoTimeFormat: formatForCulture(1, 1),\r\n kendoDateTimeFormat: formatForCulture(2, 1),\r\n inputMaskDateFormat: formatForCulture(0, 2),\r\n inputMaskTimeFormat: formatForCulture(1, 2),\r\n inputMaskDateTimeFormat: formatForCulture(2, 2),\r\n dateFormat: formatForCulture(0, 0),\r\n timeFormat: formatForCulture(1, 0),\r\n dateTimeFormat: formatForCulture(2,0)\r\n };\r\n })\r\n\r\n .directive('kendoDatePicker', [\r\n '$timeout', 'dateTimeFormatPatterns', function($timeout, dateTimeFormatPatterns) {\r\n 'use strict';\r\n\r\n return {\r\n restrict: 'A',\r\n require: '?ngModel',\r\n link: function(scope, element, attrs, ctrl) {\r\n\r\n var ntbCtrl;\r\n\r\n $timeout(function() {\r\n ntbCtrl = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n if (ntbCtrl !== undefined) {\r\n ntbCtrl.format = dateTimeFormatPatterns.kendoDateFormat;\r\n $(element).inputmask(dateTimeFormatPatterns.inputMaskDateFormat, { clearMaskOnLostFocus: false });\r\n }\r\n\r\n },300);\r\n\r\n }\r\n };\r\n\r\n }\r\n ])\r\n\r\n .directive('kendoDateTimePicker', [\r\n '$timeout', 'dateTimeFormatPatterns', function($timeout, dateTimeFormatPatterns) {\r\n 'use strict';\r\n\r\n return {\r\n restrict: 'A',\r\n require: '?ngModel',\r\n link: function(scope, element, attrs, ctrl) {\r\n\r\n var ntbCtrl;\r\n\r\n $timeout(function() {\r\n ntbCtrl = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n if (ntbCtrl !== undefined) {\r\n ntbCtrl.format = dateTimeFormatPatterns.kendoDateTimeFormat;\r\n $(element).inputmask(dateTimeFormatPatterns.inputMaskDateTimeFormat, { clearMaskOnLostFocus: false });\r\n }\r\n },300);\r\n\r\n }\r\n };\r\n\r\n }\r\n ])\r\n\r\n .directive('kendoTimePicker', [\r\n '$timeout', 'dateTimeFormatPatterns', function($timeout, dateTimeFormatPatterns) {\r\n 'use strict';\r\n\r\n return {\r\n restrict: 'A',\r\n require: '?ngModel',\r\n link: function(scope, element, attrs, ctrl) {\r\n\r\n var ntbCtrl;\r\n\r\n $timeout(function() {\r\n ntbCtrl = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n if (ntbCtrl !== undefined) {\r\n ntbCtrl.format = dateTimeFormatPatterns.kendoTimeFormat;\r\n $(element).inputmask(dateTimeFormatPatterns.inputMaskTimeFormat, { clearMaskOnLostFocus: false });\r\n }\r\n },300);\r\n }\r\n };\r\n\r\n }\r\n ]);\r\n\r\n\r\n ","// pdi.ng namespace setup\r\nvar pdi = pdi || {};\r\npdi.ng = pdi.ng || {};\r\npdi.ng.validate = pdi.ng.validate || {};\r\n\r\n//***************************************************************************************\r\n// helper functions\r\n//***************************************************************************************\r\n\r\nangular.isUndefinedOrNullOrEmpty = function(val) {\r\n 'use strict';\r\n return (angular.isUndefined(val) || val === null || val === '' || val.length === 0);\r\n};\r\n\r\nString.format = function () {\r\n 'use strict';\r\n\r\n // The string containing the format items (e.g. \"{0}\")\r\n // will and always has to be the first argument.\r\n // analogous to the C# String.format function\r\n var theString = arguments[0];\r\n\r\n if (angular.isUndefined(theString)) return;\r\n\r\n // start with the second argument (i = 1)\r\n for (var i = 1; i < arguments.length; i++) {\r\n // \"gm\" = RegEx options for Global search (more than one instance)\r\n // and for Multiline search\r\n var regEx = new RegExp(\"\\\\{\" + (i - 1) + \"\\\\}\", \"gm\");\r\n theString = theString.replace(regEx, arguments[i]);\r\n }\r\n\r\n return theString;\r\n};\r\n\r\nfunction toBoolean(value) {\r\n 'use strict';\r\n if (typeof value === 'function' || angular.isUndefined(value)) {\r\n value = true;\r\n } else if (value && value.length !== 0) {\r\n var v = angular.$$lowercase(\"\" + value);\r\n value = !(v === 'f' || v === '0' || v === 'false' || v === 'no' || v === 'n' || v === '[]');\r\n } else {\r\n value = false;\r\n }\r\n return value;\r\n}\r\n\r\npdi.ng.validate.PdiValidation =\r\n function (validation, parms) {\r\n 'use strict';\r\n return function() {\r\n return {\r\n name: validation.name,\r\n validatorParms: parms || {},\r\n validationMessage: validation.validationMessage || 'Error: Validation message is not defined for ' + validation.name,\r\n validatorError: validation.validatorError,\r\n validationMessageWrn: validation.validationMessageWrn || 'Error: Validation message is not defined for ' + validation.name,\r\n validatorWarning: validation.validatorWarning,\r\n executionExplicit: validation.executionExplicit || true // if true then the validation is not executed on model value changed and must be explicitly executed through 'executeValidations' broadcast\r\n };\r\n };\r\n };\r\n\r\n//validation UI default functions\r\npdi.ng.validate.processElementErrorNotification = function(validationAttr, hasError, element, attrs) {\r\n 'use strict';\r\n\r\n if (attrs.ngModel === undefined) { return; }\r\n\r\n var propertyName = attrs.ngModel.split('.').join('-');\r\n\r\n var validationValidationMsg = $('#' + validationAttr + '-' + propertyName);\r\n\r\n function errFocusHdlr() {\r\n $(\"#error-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: inline-block !important;');\r\n }\r\n\r\n function errBlurHdlr() {\r\n $(\"#error-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: none !important;');\r\n }\r\n\r\n function errClickHdlr() {\r\n $(\"#error-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: inline-block !important;');\r\n\r\n function hideError() {\r\n $(\"#error-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: none !important;');\r\n }\r\n\r\n setTimeout(hideError, 3000);\r\n }\r\n\r\n validationValidationMsg.toggle(hasError);\r\n\r\n var kendoDropDwnElm;\r\n var currentElement = $(element);\r\n\r\n if (hasError) {\r\n element.addClass(\"validation-error\");\r\n validationValidationMsg.attr('style', 'display: inline-block !important;');\r\n\r\n if (currentElement.data(\"kendoComboBox\")) {\r\n //var kendoDropDwnElm = angular.element(element[0].previousSibling.firstChild); // input element of kendo combobox with class k-input\r\n kendoDropDwnElm = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm.input.bind(\"focus\", errFocusHdlr);\r\n kendoDropDwnElm.input.bind(\"blur\", errBlurHdlr);\r\n\r\n } else if (currentElement.data(\"kendoDropDownList\")) {\r\n kendoDropDwnElm = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm.span.bind(\"click\", errClickHdlr);\r\n\r\n } else {\r\n element.bind(\"focus\", errFocusHdlr);\r\n element.bind(\"blur\", errBlurHdlr);\r\n }\r\n\r\n } else {\r\n\r\n element.removeClass(\"validation-error\");\r\n validationValidationMsg.attr('style', 'display: none !important;');\r\n\r\n if (currentElement.data(\"kendoComboBox\")) {\r\n\r\n kendoDropDwnElm = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm.input.unbind(\"focus\", errFocusHdlr);\r\n kendoDropDwnElm.input.unbind(\"blur\", errBlurHdlr);\r\n\r\n } else if (currentElement.data(\"kendoDropDownList\")) {\r\n kendoDropDwnElm = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm.span.unbind(\"click\", errClickHdlr);\r\n\r\n } else {\r\n element.unbind(\"focus\", errFocusHdlr);\r\n element.unbind(\"blur\", errBlurHdlr);\r\n }\r\n }\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.processElementWarningNotification = function(validationAttr, hasWarning, element, attrs) {\r\n 'use strict';\r\n\r\n if (attrs.ngModel === undefined) { return; }\r\n\r\n var propertyName = attrs.ngModel.split('.').join('-');\r\n\r\n var validationValidationMsg = $('#' + validationAttr + '-' + propertyName + '-wrn');\r\n\r\n function wrnFocusHdlr() {\r\n $(\"#warning-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: inline-block !important;');\r\n }\r\n\r\n function wrnBlurHdlr() {\r\n $(\"#warning-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: none !important;');\r\n }\r\n\r\n var currentElement = $(element);\r\n\r\n if (hasWarning) {\r\n element.addClass(\"validation-warning\");\r\n validationValidationMsg.attr('style', 'display: inline-block !important;');\r\n\r\n if ((currentElement.data(\"kendoComboBox\")) || (currentElement.data(\"kendoDropDownList\"))) {\r\n var kendoDropDwnElm = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm.input.bind(\"focus\", wrnFocusHdlr);\r\n kendoDropDwnElm.input.bind(\"blur\", wrnBlurHdlr);\r\n } else {\r\n element.bind(\"focus\", wrnFocusHdlr);\r\n element.bind(\"blur\", wrnBlurHdlr);\r\n }\r\n\r\n\r\n } else {\r\n\r\n element.removeClass(\"validation-warning\");\r\n validationValidationMsg.attr('style', 'display: none !important;');\r\n\r\n if ((currentElement.data(\"kendoComboBox\")) || (currentElement.data(\"kendoDropDownList\"))) {\r\n var kendoDropDwnElm1 = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm1.input.unbind(\"focus\", wrnFocusHdlr);\r\n kendoDropDwnElm1.input.unbind(\"blur\", wrnBlurHdlr);\r\n } else {\r\n element.unbind(\"focus\", wrnFocusHdlr);\r\n element.unbind(\"blur\", wrnBlurHdlr);\r\n }\r\n }\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.processValidationNotification = function(element, attrs, compile, scope) {\r\n 'use strict';\r\n\r\n element.removeClass(\"summaryerror\");\r\n element.removeClass(\"summarywarning\");\r\n element.removeClass(\"gridvalidationsummary\");\r\n\r\n var output = \"\";\r\n function returnOutput(){\r\n return output;\r\n }\r\n\r\n if (scope.scopeValidationErrors.length > 0) {\r\n\r\n for (var i = 0; i <= scope.scopeValidationErrors.length - 1; i++) {\r\n\r\n if (attrs.name === scope.scopeValidationErrors[i].name) {\r\n element.addClass(\"gridvalidationsummary\");\r\n element.addClass(\"summaryerror\");\r\n\r\n var validationErr = scope.scopeValidationErrors[i];\r\n output += \"
    \" + validationErr.msg + \"
    \";\r\n\r\n element.qtip({\r\n content: returnOutput(),\r\n position: {\r\n viewport: $(window),\r\n my: 'left center',\r\n at: 'top right',\r\n collision: 'fit flip',\r\n adjust: { y: 7, screen: true }\r\n },\r\n show: { delay: 0 },\r\n hide: { fixed: true },\r\n style: { classes: 'ui-tooltip-pdiError' }\r\n });\r\n }\r\n }\r\n\r\n\r\n\r\n }\r\n else if (scope.scopeValidationWarnings.length > 0) {\r\n\r\n for (var x = 0; x <= scope.scopeValidationWarnings.length - 1; x++) {\r\n\r\n if (attrs.name === scope.scopeValidationWarnings[x].name) {\r\n\r\n element.addClass(\"gridvalidationsummary\");\r\n element.addClass(\"summarywarning\");\r\n\r\n var validationWrn = scope.scopeValidationWarnings[x];\r\n output += \"
    \" + validationWrn.msg + \"
    \";\r\n\r\n element.qtip({\r\n content: returnOutput(),\r\n position: {\r\n viewport: $(window),\r\n my: 'left center',\r\n at: 'top right',\r\n collision: 'fit flip',\r\n adjust: { y: 7, screen: true }\r\n },\r\n show: { delay: 0 },\r\n hide: { fixed: true },\r\n style: { classes: 'ui-tooltip-pdiWarning' }\r\n });\r\n }\r\n }\r\n }\r\n\r\n compile(element)(scope);\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.processValidationsSummaryNotification = function(element, attrs, compile, scope) {\r\n 'use strict';\r\n\r\n element.removeClass(\"summaryerror\");\r\n element.removeClass(\"summarywarning\");\r\n element.removeClass(\"gridvalidationsummary\");\r\n\r\n if (scope.scopeValidationErrors.length > 0) {\r\n element.addClass(\"gridvalidationsummary\");\r\n element.addClass(\"summaryerror\");\r\n\r\n element.qtip({\r\n content: function() {\r\n var output = \"\";\r\n\r\n for (var i = 0; i <= scope.scopeValidationErrors.length - 1; i++) {\r\n\r\n var validationErr = scope.scopeValidationErrors[i];\r\n\r\n output += \"
    \" + validationErr.msg + \"
    \";\r\n\r\n }\r\n\r\n return output;\r\n },\r\n position: {\r\n viewport: $(window),\r\n my: 'left center',\r\n at: 'top right',\r\n collision: 'fit flip',\r\n adjust: { y: 7, screen: true }\r\n },\r\n show: { delay: 0 },\r\n hide: { fixed: true },\r\n style: { classes: 'ui-tooltip-pdiError' }\r\n });\r\n\r\n }\r\n else if (scope.scopeValidationWarnings.length > 0) {\r\n element.addClass(\"gridvalidationsummary\");\r\n element.addClass(\"summarywarning\");\r\n\r\n element.qtip({\r\n content: function() {\r\n var output = \"\";\r\n\r\n for (var i = 0; i <= scope.scopeValidationWarnings.length - 1; i++) {\r\n\r\n var validationWrn = scope.scopeValidationWarnings[i];\r\n\r\n output += \"
    \" + validationWrn.msg + \"
    \";\r\n\r\n }\r\n\r\n return output;\r\n },\r\n position: {\r\n viewport: $(window),\r\n my: 'left center',\r\n at: 'top right',\r\n collision: 'fit flip',\r\n adjust: { y: 7, screen: true }\r\n },\r\n show: { delay: 0 },\r\n hide: { fixed: true },\r\n style: { classes: 'ui-tooltip-pdiWarning' }\r\n });\r\n }\r\n\r\n compile(element)(scope);\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.createElementValidationMessageError = function(validationAttr, validationMsg, element, attrs, scope, compile) {\r\n 'use strict';\r\n\r\n var propertyName = attrs.ngModel.split('.').join('-');\r\n var currentElement = $(element);\r\n\r\n var validationMessageElement = angular.element(\r\n '
    ' +\r\n '
      ' +\r\n '
    • ' + validationMsg + '
    • ' +\r\n '
    ');\r\n if (currentElement.data(\"kendoComboBox\")) {\r\n element.after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDropDownList\")) {\r\n $(element[0]).parent().after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDatePicker\")) {\r\n $(element[0]).closest(\".k-datepicker\").after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDateTimePicker\")) {\r\n $(element[0]).closest(\".k-datetimepicker\").after(validationMessageElement);\r\n } else {\r\n //check to see if element has a clear button to clear contents\r\n // if so add error after clear button instead of element\r\n var clearBtnElm = element.siblings(\".clear-input-button\");\r\n if (clearBtnElm.length > 0) {\r\n clearBtnElm.after(validationMessageElement);\r\n } else {\r\n element.after(validationMessageElement);\r\n }\r\n }\r\n compile(validationMessageElement)(scope);\r\n validationMessageElement.hide();\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.createElementValidationMessageWarning = function (validationAttr, validationMsg, element, attrs, scope, compile) {\r\n 'use strict';\r\n\r\n var propertyName = attrs.ngModel.split('.').join('-');\r\n var currentElement = $(element);\r\n\r\n var validationMessageElement = angular.element(\r\n '
    ' +\r\n '
      ' +\r\n '
    • ' + validationMsg + '
    • ' +\r\n '
    ');\r\n\r\n if (currentElement.data(\"kendoComboBox\")) {\r\n element.after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDropDownList\")) {\r\n $(element[0]).parent().after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDatePicker\")) {\r\n $(element[0]).closest(\".k-datepicker\").after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDateTimePicker\")) {\r\n $(element[0]).closest(\".k-datetimepicker\").after(validationMessageElement);\r\n } else {\r\n //check to see if element has a clear button to clear contents\r\n // if so add error after clear button instead of element\r\n var clearBtnElm = element.siblings(\".clear-input-button\");\r\n if (clearBtnElm.length > 0) {\r\n clearBtnElm.after(validationMessageElement);\r\n } else {\r\n element.after(validationMessageElement);\r\n }\r\n }\r\n compile(validationMessageElement)(scope);\r\n validationMessageElement.hide();\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.removeElementValidationMessage = function(element, attrs, scope, compile) {\r\n 'use strict';\r\n\r\n var currentElement = $(element);\r\n\r\n if (element.hasClass('summaryerror')) {\r\n element.removeClass(\"summaryerror\");\r\n element.removeClass(\"summarywarning\");\r\n element.removeClass(\"gridvalidationsummary\");\r\n }\r\n\r\n if (currentElement.data(\"kendoDropDownList\")) {\r\n element.parent().siblings().each(function() {\r\n var $this = $(this);\r\n\r\n if ($this.hasClass('validationBar')) {\r\n $this.remove();\r\n }\r\n\r\n compile()(scope);\r\n });\r\n } else {\r\n element.parent().children().each(function() {\r\n var $this = $(this);\r\n\r\n if ($this.hasClass('validationBar')) {\r\n $this.remove();\r\n }\r\n\r\n compile()(scope);\r\n });\r\n }\r\n\r\n return;\r\n};\r\n\r\n//pdi validation defaults\r\n\r\npdi.ng.validate.requiredMsgDefault = '';\r\npdi.ng.validate.minLengthMsgDefault = '';\r\npdi.ng.validate.maxLengthMsgDefault = '';\r\npdi.ng.validate.valueRuleRngMsgDefault = '';\r\npdi.ng.validate.valueRuleGtMsgDefault = '';\r\npdi.ng.validate.valueRuleLtMsgDefault = '';\r\npdi.ng.validate.ptrnEmailMsgDefault = '';\r\n\r\nvar pdiRequiredExecutionExplicitDefault = true;\r\nvar pdiMinLengthExecutionExplicitDefault = true;\r\nvar pdiMaxLengthExecutionExplicitDefault = true;\r\nvar pdiMaxLengthEnforceMaxConstraintDefault = false;\r\nvar pdiValueRuleRangeExecutionExplicitDefault = true;\r\nvar pdiValueRuleGreaterThanExecutionExplicitDefault = true;\r\nvar pdiValueRuleLessThanExecutionExplicitDefault = true;\r\nvar pdiEmailValidataionExecutionExplicitDefault = true;\r\n\r\n\r\nfunction evaluateIfConditions(ifExpr, scope) {\r\n 'use strict';\r\n return toBoolean(scope.$eval(ifExpr));\r\n}\r\n\r\nangular.module('pdi.validate', [])\r\n .service('validatorSvc', [\r\n '$rootScope', function($rootScope) {\r\n\r\n $rootScope.scopesToValidate = [];\r\n $rootScope.formModelWatchers = [];\r\n\r\n function executeValidationsForScope(scope) {\r\n 'use strict';\r\n\r\n for (var cs = scope.$$childHead; cs; cs=cs.$$nextSibling) {\r\n executeValidationsForScope(cs);\r\n }\r\n\r\n if (angular.isUndefinedOrNullOrEmpty(scope.scopeValidations)) {\r\n return true;\r\n }\r\n\r\n // broadcast event for elements to clear their errors/warnings and notification UI\r\n scope.$broadcast('clearElementValidationNotifications', {});\r\n scope.$broadcast('clearSummaryValidationNotifications', {});\r\n\r\n var validation;\r\n\r\n //clear arrays\r\n scope.scopeValidationErrors = [];\r\n scope.scopeValidationWarnings.length = [];\r\n\r\n var hadError = false;\r\n var validatorResult = {};\r\n\r\n for (var i = 0; i <= scope.scopeValidations.length - 1; i++) {\r\n validation = scope.scopeValidations[i];\r\n\r\n hadError = false;\r\n\r\n // check to see if element already has an error if so don't eval addition element validations\r\n if (validation.attrs.errors.length === 0) {\r\n //validate errors\r\n validatorResult = validation.validator().validateErrors();\r\n\r\n if (validatorResult !== undefined) {\r\n if (validatorResult.hasError) {\r\n scope.scopeValidationErrors.push(validatorResult);\r\n validation.attrs.errors.push(validatorResult);\r\n\r\n if (validation.attrs.ngModelCtrl.$setValidity !== undefined) {\r\n validation.attrs.ngModelCtrl.$setValidity(validatorResult.name, false);\r\n }\r\n\r\n hadError = true;\r\n }\r\n }\r\n\r\n if (!hadError) {\r\n validatorResult = validation.validator().validateWarnings();\r\n\r\n if (validatorResult !== undefined) {\r\n if (validatorResult.hasWarning) {\r\n scope.scopeValidationWarnings.push(validatorResult);\r\n validation.attrs.warnings.push(validatorResult);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n scope.$broadcast('processElementValidationNotifications', {});\r\n scope.$broadcast('processSummaryValidationNotifications', {});\r\n\r\n return (scope.scopeValidationErrors.length === 0);\r\n }\r\n\r\n return {\r\n executeValidations: function() {\r\n 'use strict';\r\n\r\n var isValid = true;\r\n\r\n for (var i = 0; i <= $rootScope.scopesToValidate.length - 1; i++) {\r\n var validatorResult = executeValidationsForScope($rootScope.scopesToValidate[i].scope);\r\n isValid = isValid && validatorResult;\r\n }\r\n\r\n return isValid;\r\n },\r\n executeValidationsForScope: executeValidationsForScope,\r\n addScopeToValidate: function(scope, view) {\r\n 'use strict';\r\n\r\n var addScope = true;\r\n\r\n //check to see if scope already added to validate\r\n for (var i = 0; i <= $rootScope.scopesToValidate.length - 1; i++) {\r\n if ($rootScope.scopesToValidate[i].scopeID === scope.$id) {\r\n addScope = false;\r\n break;\r\n }\r\n }\r\n\r\n if (addScope) {\r\n $rootScope.scopesToValidate.push({ scopeID: scope.$id, scope: scope, view: view });\r\n\r\n for (var cs = scope.$$childHead; cs; cs=cs.$$nextSibling) {\r\n $rootScope.scopesToValidate.push({ scopeID: cs.$id, scope: cs, view: view });\r\n }\r\n }\r\n },\r\n clearValidationScopes: function() {\r\n 'use strict';\r\n $rootScope.scopesToValidate = [];\r\n// $rootScope.formModelWatchers = [];\r\n },\r\n clearAllValidations: function() {\r\n $rootScope.$broadcast('clearElementValidationNotifications', {});\r\n }\r\n };\r\n }\r\n ])\r\n\r\n .directive('pdiValidations', ['validatorSvc', '$compile', '$timeout', function (validatorSvc, $compile, $timeout) {\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: function(scope, element, attrs, ctrl) {\r\n 'use strict';\r\n if ((!ctrl) || ( attrs.pdiValidations==='')) { return; }\r\n\r\n attrs.ngModelCtrl = ctrl;\r\n\r\n var model = attrs.ngModel;\r\n\r\n var pdivalidation = scope.$eval(attrs.pdiValidations);\r\n\r\n var validatorFn = function() {\r\n\r\n return {\r\n validateErrors: function() {\r\n\r\n if (pdivalidation.validatorError === undefined) { return; }\r\n\r\n var validatorParms = pdivalidation.validatorParms;\r\n\r\n var elementValue = scope.$eval(model); //element.val().trimRight();\r\n var expression = pdivalidation.validatorError(elementValue, validatorParms);\r\n\r\n if (angular.isObject(expression) && angular.isFunction(expression.then)) {\r\n // expression is a promise\r\n var deferred = $q.defer();\r\n expression.then(function() {\r\n deferred.resolve(\"\");\r\n }, function() {\r\n var error = { name: pdivalidation.name, model: model, msg: pdivalidation.validationMessage, hasError: true };\r\n deferred.reject(error);\r\n });\r\n return deferred.promise;\r\n } else if (!expression) {\r\n // expression false\r\n return { name: pdivalidation.name, model: model, msg: pdivalidation.validationMessage, hasError: true };\r\n }\r\n },\r\n validateWarnings: function() {\r\n\r\n if (pdivalidation.validatorWarning === undefined) { return; }\r\n\r\n var validatorParms = pdivalidation.validatorParms;\r\n\r\n var elementValue = scope.$eval(model); //element.val().trimRight();\r\n var expression = pdivalidation.validatorWarning(elementValue, validatorParms);\r\n\r\n\r\n if (!expression) {\r\n return { name: pdivalidation.name, model: model, msg: pdivalidation.validationMessageWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: pdivalidation.name, model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n /*angular.forEach(attrs.pdiValidations, function(index) {\r\n\r\n var validateErrors = (attrs.pdiValidations[index].validatorError) ? true : false;\r\n var validateWarnings = (attrs.pdiValidations[index].validatorWarning) ? true : false;\r\n\r\n var validatorFn = function() {\r\n\r\n return {\r\n validateErrors: function() {\r\n\r\n if (!validateErrors) return;\r\n\r\n var elementValue = element.val().trimRight();\r\n var expression = pdivalidation.validatorError(elementValue);\r\n\r\n if (!expression) {\r\n return { name: pdivalidation.name + key, model: model, msg: pdivalidation.validationMessage, hasError: true };\r\n }\r\n },\r\n validateWarnings: function() {\r\n\r\n if (!validateWarnings) return;\r\n\r\n var elementValue = element.val().trimRight();\r\n var expression = pdivalidation.validatorWarning(elementValue);\r\n\r\n if (angular.isObject(expression) && angular.isFunction(expression.then)) {\r\n // expression is a promise\r\n expression.then(function() {\r\n }, function() {\r\n attrs.warnings.push({ name: pdivalidation.name + key, model: model, msg: pdivalidation.validationMessageWrn });\r\n });\r\n return;\r\n } else if (!expression) {\r\n // expression false\r\n attrs.warnings.push({ name: pdivalidation.name + key, model: model, msg: pdivalidation.validationMessageWrn });\r\n return;\r\n }\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: pdivalidation.name + key, model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n //attrs.validations.push(({ name: pdivalidation.name + key, model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 }));\r\n\r\n });*/\r\n },\r\n controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {\r\n 'use strict';\r\n\r\n $scope.scopeValidations = $scope.scopeValidations || [];\r\n $scope.scopeValidationErrors = $scope.scopeValidationErrors || [];\r\n $scope.scopeValidationWarnings = $scope.scopeValidationWarnings || [];\r\n\r\n validatorSvc.addScopeToValidate($scope);\r\n\r\n $attrs.validations = [];\r\n $attrs.errors = [];\r\n $attrs.warnings = [];\r\n\r\n $attrs.ngModelCtrl = {};\r\n\r\n $attrs.hasWarnings = false;\r\n\r\n this.addValidation = function(validation) {\r\n $attrs.validations.push(validation);\r\n };\r\n\r\n $scope.$on('executeValidationsForScope', function () {\r\n validatorSvc.executeValidationsForScope($scope);\r\n });\r\n\r\n //used to forced process the error/waring and display the notification UI for the element'\r\n $scope.$on('processElementValidationNotifications', function () {\r\n if (!angular.isUndefined($attrs.showValidationNotification) && !$scope.$eval($attrs.showValidationNotification)) { return; }\r\n\r\n if ($attrs.errors.length > 0) {\r\n pdi.ng.validate.createElementValidationMessageError($attrs.errors[0].name, $attrs.errors[0].msg, $element, $attrs, $scope, $compile);\r\n pdi.ng.validate.processElementErrorNotification($attrs.errors[0].name, true, $element, $attrs);\r\n } else if ($attrs.warnings.length > 0) {\r\n pdi.ng.validate.createElementValidationMessageWarning($attrs.warnings[0].name, $attrs.warnings[0].msg, $element, $attrs, $scope, $compile);\r\n pdi.ng.validate.processElementWarningNotification($attrs.warnings[0].name, true, $element, $attrs);\r\n }\r\n });\r\n\r\n //used to forced clear element error/warning and clear the notification UI'\r\n $scope.$on('clearElementValidationNotifications', function () {\r\n\r\n pdi.ng.validate.removeElementValidationMessage($element, $attrs, $scope, $compile);\r\n\r\n if ($attrs.errors.length > 0) {\r\n pdi.ng.validate.processElementErrorNotification($attrs.errors[0].name, false, $element, $attrs);\r\n }\r\n\r\n if ($attrs.warnings.length > 0) {\r\n pdi.ng.validate.processElementWarningNotification($attrs.warnings[0].name, false, $element, $attrs);\r\n }\r\n\r\n //clear element arrays\r\n $attrs.errors.length = 0;\r\n $attrs.warnings.length = 0;\r\n });\r\n }]\r\n };\r\n }\r\n ])\r\n\r\n .directive('pdiValidation', ['$rootScope', 'validatorSvc', '$compile', '$timeout', function ($rootScope, validatorSvc, $compile, $timeout) {\r\n\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n terminal: true,\r\n template: '
    ',\r\n link: function (scope, element, attrs) {\r\n 'use strict';\r\n\r\n if (attrs.errorValidatorFn !== undefined || attrs.warningValidatorFn !== undefined) {\r\n\r\n var ctrlIndex = scope.scopeValidations.length + 1;\r\n\r\n attrs.name = 'pdiValidation' + ctrlIndex.toString();\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (attrs.errorValidatorFn === undefined) return;\r\n\r\n var validatorResult = scope.$eval(attrs.errorValidatorFn);\r\n\r\n if (validatorResult) { //has errors\r\n return { name: 'pdiValidation' + ctrlIndex.toString(), msg: attrs.validationErrorMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (attrs.warningValidatorFn === undefined) return;\r\n\r\n var validatorResult = attrs.warningValidatorFn();\r\n\r\n if (validatorResult) { //has warnings\r\n return { name: 'pdiValidation' + ctrlIndex.toString(), msg: attrs.validationWarningMsg, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiValidation' + ctrlIndex.toString(), element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n },\r\n controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {\r\n 'use strict';\r\n\r\n $scope.scopeValidations = $scope.scopeValidations || [];\r\n $scope.scopeValidationErrors = $scope.scopeValidationErrors || [];\r\n $scope.scopeValidationWarnings = $scope.scopeValidationWarnings || [];\r\n\r\n validatorSvc.addScopeToValidate($scope);\r\n\r\n $attrs.validations = [];\r\n $attrs.errors = [];\r\n $attrs.warnings = [];\r\n\r\n $attrs.ngModelCtrl = {};\r\n\r\n $attrs.hasWarnings = false;\r\n\r\n //used to forced process the error/waring and display the notification UI for the element'\r\n $scope.$on('processElementValidationNotifications', function () {\r\n pdi.ng.validate.processValidationNotification($element, $attrs, $compile, $scope);\r\n });\r\n\r\n //used to forced clear element error/warning and clear the notification UI'\r\n $scope.$on('clearElementValidationNotifications', function () {\r\n\r\n pdi.ng.validate.processValidationNotification($element, $attrs, $compile, $scope);\r\n pdi.ng.validate.removeElementValidationMessage($element, $attrs, $scope, $compile);\r\n\r\n //clear element arrays\r\n $attrs.errors.length = 0;\r\n $attrs.warnings.length = 0;\r\n });\r\n }]\r\n };\r\n }])\r\n\r\n .directive('pdiValidationsSummary', ['$rootScope', 'validatorSvc', '$compile', '$timeout', function ($rootScope, validatorSvc, $compile, $timeout) {\r\n\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n terminal: true,\r\n template: '
    ',\r\n link: function (scope, element, attrs) {\r\n 'use strict';\r\n\r\n if (attrs.data !== undefined && attrs.formModel !== undefined) {\r\n var newScope = $rootScope.$new();\r\n\r\n var appHtml = $('[ng-controller]').html();\r\n var ele = angular.element(appHtml);\r\n\r\n newScope[attrs.formModel] = scope.$eval(attrs.data);\r\n\r\n var view = $compile(ele)(newScope);\r\n\r\n validatorSvc.addScopeToValidate(newScope, view);\r\n\r\n //used to forced process the error/waring and display the notification UI for the element'\r\n newScope.$on('processSummaryValidationNotifications', function () {\r\n pdi.ng.validate.processValidationsSummaryNotification(element, attrs, $compile, newScope);\r\n });\r\n\r\n //used to forced clear element error/warning and clear the notification UI'\r\n newScope.$on('clearSummaryValidationNotifications', function () {\r\n pdi.ng.validate.processValidationsSummaryNotification(element, attrs, $compile, newScope);\r\n });\r\n\r\n var addFormModelWatcher = true;\r\n\r\n //check to see if form model already added to array\r\n for (var i = 0; i <= $rootScope.formModelWatchers.length - 1; i++) {\r\n if ($rootScope.formModelWatchers[i].formModel === attrs.formModel) {\r\n addFormModelWatcher = false;\r\n break;\r\n }\r\n }\r\n\r\n if (addFormModelWatcher) {\r\n\r\n var watchUnBinder =$rootScope.$watch(function () {\r\n return scope.$eval(attrs.formModel);\r\n }, function (newValue, oldValue) {\r\n if (oldValue === undefined) {\r\n return;\r\n }\r\n\r\n $timeout(function() {\r\n scope.$parent.$broadcast('clearElementValidationNotifications', {});\r\n validatorSvc.executeValidations();\r\n scope.$parent.$broadcast('processElementValidationNotifications', {});\r\n });\r\n });\r\n\r\n $rootScope.formModelWatchers.push({ formModel: attrs.formModel, unBinderFn: watchUnBinder });\r\n }\r\n }\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiRequired', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // required-validation-msg\r\n // required-execution-explicit\r\n // required-if-expr\r\n // required-validation-msg-wrn\r\n // required-if-expr-wrn\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.requiredValidationMsg) || ((!attrs.requiredValidationMsg) && (!attrs.requiredValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.requiredValidationMsgWrn) ? true : false;\r\n\r\n var requiredValidationMsg = attrs.requiredValidationMsg || pdi.ng.validate.requiredMsgDefault || 'required validation undefined';\r\n var requiredValidationMsgWrn = attrs.requiredValidationMsgWrn;\r\n var requiredExecutionExplicit = attrs.requiredExecutionExplicit || pdiRequiredExecutionExplicitDefault;\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (attrs.disabled) { return; } // if element is disabled then don't enforce validations on the element\r\n\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.requiredIfExpr, scope) &&\r\n (ctrl.$isEmpty(ctrl.$viewValue))) {\r\n\r\n return { name: 'pdiRequired', model:model, msg: requiredValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.requiredIfExprWrn, scope) &&\r\n (ctrl.$isEmpty(ctrl.$viewValue))) {\r\n\r\n return { name: 'pdiRequired', model: model, msg: requiredValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiRequired', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiMinlength', ['validatorSvc', function (validatorSvc) {\r\n\r\n //usage\r\n //minlengthValidationMsg: '=',\r\n // minlengthExecutionExplicit: '=',\r\n // minlengthIfExpr: '@',\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.minlengthValidationMsg) || ((!attrs.minlengthValidationMsg) && (!attrs.minlengthValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.minlengthValidationMsgWrn) ? true : false;\r\n\r\n var minlengthValidationMsg = attrs.minlengthValidationMsg || 'minLength validation undefined';\r\n var minlengthValidationMsgWrn = attrs.minlengthValidationMsgWrn;\r\n var minlengthExecutionExplicit = attrs.minlengthExecutionExplicit || pdiMinLengthExecutionExplicitDefault;\r\n\r\n minlengthValidationMsg = String.format(minlengthValidationMsg, attrs.pdiMinlength);\r\n minlengthValidationMsgWrn = String.format(minlengthValidationMsgWrn, attrs.pdiMinlength);\r\n\r\n var validatorFn = function() {\r\n return {\r\n validateErrors: function() {\r\n\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.minlengthIfExpr, scope) &&\r\n (ctrl.$isEmpty(ctrl.$viewValue) || ctrl.$viewValue.length < attrs.pdiMinlength)) {\r\n\r\n return { name: 'pdiMinlength', model: model, msg: minlengthValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function() {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.minlengthIfExprWrn, scope) &&\r\n (ctrl.$isEmpty(ctrl.$viewValue) || ctrl.$viewValue.length < attrs.pdiMinlength)) {\r\n\r\n return { name: 'pdiMinlength', model: model, msg: minlengthValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiMinlength', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiMaxlength', ['validatorSvc', function (validatorSvc) {\r\n\r\n //usage\r\n //maxlengthValidationMsg: '=',\r\n // maxlengthExecutionExplicit: '=',\r\n // maxlengthIfExpr: '@',\r\n // enforceMaxConstraint: '='\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function(scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.maxlengthValidationMsg) || ((!attrs.maxlengthValidationMsg) && (!attrs.maxlengthValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.maxlengthValidationMsgWrn) ? true : false;\r\n\r\n var enforceMaxConstraint = attrs.enforcemaxconstraint || pdiMaxLengthEnforceMaxConstraintDefault;\r\n\r\n var ifConditions = evaluateIfConditions(attrs.maxlengthIfExpr, scope);\r\n\r\n // if enforceMaxConstraint is true then the max length will be enforce through the UI by preventing\r\n // input of more that specified length and not through validation.\r\n if (enforceMaxConstraint && ifConditions) {\r\n element.bind('keypress', function(event) {\r\n // Once the limit has been met or exceeded, prevent all keypresses from working\r\n if (element.val().length >= attrs.pdiMaxlength) {\r\n // Except backspace\r\n if (event.keyCode !== 8) {\r\n event.preventDefault();\r\n }\r\n }\r\n });\r\n } else {\r\n\r\n var maxlengthValidationMsg = attrs.maxlengthValidationMsg || 'maxLength validation undefined';\r\n var maxlengthValidationMsgWrn = attrs.maxlengthValidationMsgWrn;\r\n var maxlengthExecutionExplicit = attrs.maxlengthExecutionExplicit || pdiMaxLengthExecutionExplicitDefault;\r\n\r\n maxlengthValidationMsg = String.format(maxlengthValidationMsg, attrs.pdiMaxlength);\r\n maxlengthValidationMsgWrn = String.format(maxlengthValidationMsgWrn, attrs.pdiMaxlength);\r\n\r\n var validatorFn = function() {\r\n return {\r\n validateErrors: function() {\r\n\r\n if (!validateErrors) return;\r\n\r\n if (ifConditions && (ctrl.$viewValue.length > attrs.pdiMaxlength)) {\r\n\r\n return { name: 'pdiMaxlength', model: model, msg: maxlengthValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function() {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (ifConditions && (ctrl.$viewValue.length > attrs.pdiMaxlength)) {\r\n\r\n return { name: 'pdiMaxlength', model: model, msg: maxlengthValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiMaxlength', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n }\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiValueruleRange', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // valuerule-rng-validation-msg\r\n // valuerule-rng-execution-explicit\r\n // valuerule-rng-if-expr\r\n // valuerule-rng-validation-msg-wrn\r\n // valuerule-rng-if-expr-wrn\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.valueruleRngValidationMsg) || ((!attrs.valueruleRngValidationMsg) && (!attrs.valueruleRngValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.valueruleRngValidationMsgWrn) ? true : false;\r\n\r\n var rangeParms = attrs.pdiValueruleRange.split(',');\r\n\r\n if (rangeParms.length !== 2) return;\r\n\r\n var lowerLimit = rangeParms[0].toNumber();\r\n var upperLimit = rangeParms[1].toNumber();\r\n\r\n var valueRuleRngValidationMsg = attrs.valueruleRngValidationMsg || 'valueRuleRng validation undefined';\r\n var valueRuleRngValidationMsgWrn = attrs.valueruleRngValidationMsgWrn;\r\n var valueRuleRngExecutionExplicit = attrs.valueruleRngExecutionExplicit || pdiValueRuleRangeExecutionExplicitDefault;\r\n\r\n valueRuleRngValidationMsg = String.format(valueRuleRngValidationMsg, lowerLimit, upperLimit);\r\n valueRuleRngValidationMsgWrn = String.format(valueRuleRngValidationMsgWrn, lowerLimit, upperLimit);\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleRngIfExpr, scope) &&\r\n (ctrl.$viewValue.toNumber() < lowerLimit || ctrl.$viewValue.toNumber() > upperLimit)) {\r\n\r\n return { name: 'pdiValueruleRange', model: model, msg: valueRuleRngValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleRngIfExprWrn, scope) &&\r\n (parseInt(ctrl.$viewValue, 10) < lowerLimit || parseInt(ctrl.$viewValue, 10) > upperLimit)) {\r\n\r\n return { name: 'pdiValueruleRange', model: model, msg: valueRuleRngValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiValueruleRange', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiValueruleGreaterthan', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // valuerule-gt-validation-msg\r\n // valuerule-gt-execution-explicit\r\n // valuerule-gt-if-expr\r\n // valuerule-gt-validation-msg-wrn\r\n // valuerule-gt-if-value-expr\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.valueruleGtValidationMsg) || ((!attrs.valueruleGtValidationMsg) && (!attrs.valueruleGtValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.valueruleGtValidationMsgWrn) ? true : false;\r\n\r\n var valueruleGtValidationMsg = attrs.valueruleGtValidationMsg || 'valueRuleGT validation undefined';\r\n var valueruleGtValidationMsgWrn = attrs.valueruleGtValidationMsgWrn;\r\n var valueRuleGtExecutionExplicit = attrs.valueruleGtExecutionExplicit || pdiValueRuleGreaterThanExecutionExplicitDefault;\r\n\r\n valueruleGtValidationMsg = String.format(valueruleGtValidationMsg, attrs.pdiValueruleGreaterthan);\r\n valueruleGtValidationMsgWrn = String.format(valueruleGtValidationMsgWrn, attrs.pdiValueruleGreaterthan);\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleGtIfExpr, scope) &&\r\n (parseFloat(ctrl.$viewValue) <= attrs.pdiValueruleGreaterthan)) {\r\n\r\n return { name: 'pdiValueruleGreaterthan', model: model, msg: valueruleGtValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleGtIfExprWrn, scope) &&\r\n (parseFloat(ctrl.$viewValue) <= attrs.pdiValueruleGreaterthan)) {\r\n\r\n return { name: 'pdiValueruleGreaterthan', model: model, msg: valueruleGtValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiValueruleGreaterthan', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiValueruleLessthan', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // valuerule-lt-validation-msg\r\n // valuerule-lt-execution-explicit\r\n // valuerule-lt-if-expr\r\n // valuerule-lt-validation-msg-wrn\r\n // valuerule-lt-if-expr-wrn\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.valueruleLtValidationMsg) || ((!attrs.valueruleLtValidationMsg) && (!attrs.valueruleLtValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.valueruleLtValidationMsgWrn) ? true : false;\r\n\r\n var valueruleLtValidationMsg = attrs.valueruleLtValidationMsg || 'valueRuleLT validation undefined';\r\n var valueruleLtValidationMsgWrn = attrs.valueruleLtValidationMsgWrn;\r\n var valueRuleLtExecutionExplicit = attrs.valueruleLtExecutionExplicit || pdiValueRuleLessThanExecutionExplicitDefault;\r\n\r\n valueruleLtValidationMsg = String.format(valueruleLtValidationMsg, attrs.pdiValueruleLessthan);\r\n valueruleLtValidationMsgWrn = String.format(valueruleLtValidationMsgWrn, attrs.pdiValueruleLessthan);\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleLtIfExpr, scope) &&\r\n (parseInt(ctrl.$viewValue, 10) >= attrs.pdiValueruleLessthan)) {\r\n\r\n return { name: 'pdiValueruleLessthan', model: model, msg: valueruleLtValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleLtIfExprWrn, scope) &&\r\n (parseInt(ctrl.$viewValue, 10) >= attrs.pdiValueruleLessthan)) {\r\n\r\n return { name: 'pdiValueruleLessthan', model: model, msg: valueruleLtValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiValueruleLessthan', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiValueIsNumeric', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // pdi-value-is-numeric\r\n // pdi-value-is-numeric-msg\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.pdiValueIsNumeric || (!attrs.pdiValueIsNumeric && !attrs.pdiValueIsNumeric)) ? true : false;\r\n var validateWarnings = true;\r\n var ptrnValidationMsg = attrs.pdiValueIsNumericMsg || 'pdiValueIsNumeric validation undefined';\r\n\r\n var validatorFn = function () {\r\n return {\r\n validateErrors: function () {\r\n if (!validateWarnings) return;\r\n\r\n if (!isNaN(ctrl.$viewValue)) {\r\n return;\r\n }\r\n\r\n return { name: 'pdiValueIsNumeric', model: model, msg: ptrnValidationMsg, hasError: true };\r\n },\r\n validateWarnings: function () {\r\n if (!validateWarnings || angular.isUndefinedOrNullOrEmpty(ctrl.$viewValue)) return;\r\n }\r\n };\r\n };\r\n scope.scopeValidations.push({ name: 'pdiValueIsNumeric', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiDateIsGreaterEqualTo', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // pdi-date-is-greater-equal-to\r\n // pdi-date-is-greater-equal-to-from-date\r\n // pdi-date-is-greater-equal-to-msg\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.pdiDateIsGreaterEqualToMsg || (!attrs.pdiDateIsGreaterEqualToMsg && !attrs.pdiDateIsGreaterEqualToMsgWrn)) ? true : false;\r\n var validateWarnings = true;\r\n var ptrnValidationMsg = attrs.pdiDateIsGreaterEqualToMsg || 'pdiDateIsGreaterEqualTo validation undefined';\r\n\r\n var validatorFn = function () {\r\n var fromDate = attrs.pdiDateIsGreaterEqualToFromDate;\r\n var thruDate = ctrl.$viewValue;\r\n\r\n return {\r\n validateErrors: function () {\r\n if (!validateWarnings) return;\r\n if (Date.parse(thruDate) >= Date.parse(fromDate)) {\r\n return;\r\n }\r\n return { name: 'pdiDateIsGreaterEqualTo', model: model, msg: ptrnValidationMsg, hasError: true };\r\n },\r\n validateWarnings: function () {\r\n if (!validateWarnings || angular.isUndefinedOrNullOrEmpty(ctrl.$viewValue)) return;\r\n }\r\n };\r\n };\r\n scope.scopeValidations.push({ name: 'pdiDateIsGreaterEqualTo', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiPatternEmail', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // ptrn-email-validation-msg\r\n // ptrn-email-execution-explicit\r\n // ptrn-email-validation-msg-wrn\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.ptrnEmailValidationMsg) || ((!attrs.ptrnEmailValidationMsg) && (!attrs.ptrnEmailValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.ptrnEmailValidationMsgWrn) ? true : false;\r\n\r\n var ptrnValidationMsg = attrs.ptrnEmailValidationMsg || 'ptrnEmail validation undefined';\r\n var ptrnValidationMsgWrn = attrs.ptrnEmailValidationMsgWrn;\r\n var ptrnExecutionExplicit = attrs.prtnEmailExecutionExplicit || pdiEmailValidataionExecutionExplicitDefault;\r\n\r\n var regExPattern = new RegExp(/^[A-Za-z0-9_\\+-]+(\\.[A-Za-z0-9_\\+-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*\\.([A-Za-z]+)$/);\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (!validateErrors || angular.isUndefinedOrNullOrEmpty(ctrl.$viewValue)) return;\r\n\r\n var emails = ctrl.$viewValue.split(';');\r\n\r\n // process errors on element\r\n for (var i = 0 ; i <= emails.length - 1; i++) {\r\n if (!regExPattern.test(emails[i].trim())){\r\n ptrnValidationMsg = String.format(ptrnValidationMsg, emails[i]);\r\n return { name: 'pdiPatternEmail', model: model, msg: ptrnValidationMsg, hasError: true };\r\n }\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (!validateWarnings || angular.isUndefinedOrNullOrEmpty(ctrl.$viewValue)) return;\r\n\r\n var emails = ctrl.$viewValue.split(';');\r\n\r\n // process errors on element\r\n for (var i = 0 ; i <= emails.length - 1; i++) {\r\n if (!regExPattern.test(emails[i])){\r\n ptrnValidationMsgWrn = String.format(ptrnValidationMsgWrn, emails[i]);\r\n\r\n return { name: 'pdiPatternEmail', model: model, msg: ptrnValidationMsgWrn, hasWarning: true };\r\n }\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiPatternEmail', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n }\r\n };\r\n }])\r\n .directive('pdiValueruleMatchElement', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // valuerule-match-element-validation-msg\r\n // valuerule-match-element-execution-explicit\r\n // valuerule-match-element-if-expr\r\n // valuerule-match-element-validation-msg-wrn\r\n // valuerule-match-element-if-expr-wrn\r\n // valuerule-ng-model-match (this is the model value to compare against)\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls, $parse) {\r\n 'use strict';\r\n\r\n if (ctrls.length !==2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n var match = attrs.valueruleNgModelMatch;\r\n\r\n var validateErrors = (attrs.valueruleMatchElementValidationMsg) || ((!attrs.valueruleMatchElementValidationMsg) && (!attrs.valueruleMatchElementValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.valueRuleMatchElementValidationMsgWrn) ? true : false;\r\n\r\n var matchElementValidationMsg = attrs.valueruleMatchElementValidationMsg || 'validation undefined';\r\n var matchElementValidationMsgWrn = attrs.valueruleMatchElementValidationMsgWrn;\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleMatchElementIfExpr, scope)) {\r\n var matchValue = scope.$eval(match);\r\n var modelValue = scope.$eval(model);\r\n if (matchValue !== modelValue) {\r\n return { name: 'pdiValueruleMatchElement', model: model, msg: matchElementValidationMsg, hasError: true };\r\n }\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleMatchElementIfExprWrn, scope)) {\r\n var matchValue = scope.$eval(match);\r\n var modelValue = scope.$eval(model);\r\n if (matchValue !== modelValue) {\r\n return { name: 'pdiValueruleMatchElement', model: model, msg: matchElementValidationMsgWrn, hasWarning: true };\r\n }\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiValueruleMatchElement', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n };\r\n }]);\r\n","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nfunction CustomerPaymentAccount(account){\r\n this.AccountNo = account.AccountNo;\r\n this.AccountNoVerify = account.AccountNoVerify;\r\n this.AccountNoMasked = account.AccountNoMasked;\r\n this.AccountStatus = account.AccountStatus;\r\n this.AccountStatusDesc = account.AccountStatusDesc;\r\n this.AccountType = account.AccountType;\r\n this.BankRoutingNo = account.BankRoutingNo;\r\n this.CreatedDateTime = account.CreatedDateTime;\r\n this.CreatedByCustContKey = account.CreatedByCustContKey;\r\n this.CustKey = account.CustKey;\r\n this.Description = account.Description;\r\n this.Key = account.Key;\r\n this.LastModifiedDateTime = account.LastModifiedDateTime;\r\n this.LastModifiedByCustContKey = account.LastModifiedByCustContKey;\r\n this.PrenoteDate = account.PrenoteDate;\r\n this.RejectedEmailSent = account.RejectedEmailSent;\r\n this.VerificationAmount1 = account.VerificationAmount1;\r\n this.VerificationAmount2 = account.VerificationAmount2;\r\n this.VerificationDate = account.VerificationDate;\r\n this.TimeStamp = account.TimeStamp;\r\n this.IsDefault = account.IsDefault;\r\n this.AccountLastActivity = account.AccountLastActivity;\r\n this.AccountNextPaymentKey = account.AccountNextPaymentKey;\r\n this.AccountNextPayment = account.AccountNextPayment;\r\n this.AccountNextPaymentAmmount = account.AccountNextPaymentAmmount;\r\n this.ScheduledPaymentCount = account.ScheduledPaymentCount;\r\n}\r\n\r\n\r\n\r\nangular.module('services.paymentAccounts', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.paymentAccounts',[]).factory('PaymentAccountService', function($q, ajax, apiService) {\r\n 'use strict';\r\n var WebPaymentAccount = {};\r\n return{\r\n WebPaymentAccount:WebPaymentAccount,\r\n getPaymentAccountList : function(customerKey){\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/WebPaymentAccounts/' + customerKey,\r\n params: {}\r\n });\r\n var deferred = $q.defer();\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getPaymentAccount : function(customerPaymentAccountKey, customerKey){\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/WebPaymentAccount/' + customerPaymentAccountKey + '/' + customerKey,\r\n params: {}\r\n });\r\n var deferred = $q.defer();\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n savePaymentAccount : function(webPaymentAccount){\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/WebPaymentAccount',\r\n data: webPaymentAccount\r\n }\r\n );\r\n var deferred = $q.defer();\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n validateRoutingNumber : function(routingNumber){\r\n var deferred = $q.defer();\r\n ajax.get('../api/WebPaymentAccountValidateRoutingNumber', routingNumber)\r\n .then(function(data, status, config, headers){\r\n var routingNubmerisValid = true;\r\n deferred.resolve(routingNubmerisValid);\r\n })\r\n .catch(function(data, status, config, headers){\r\n var routingNubmerisValid = data;\r\n deferred.reject(routingNubmerisValid);\r\n });\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by jvitoria on 4/1/2015.\r\n */\r\n/* ==============================================================================\r\n\r\n CORE.FILTERS MODULE\r\n\r\n Defines the module namespace for the core.filters\r\n\r\n ============================================================================= */\r\nangular.module('core.filters', []);\r\n\r\n\r\nangular.module('core.filters')\r\n .filter('htmlToPlaintext', function() {\r\n return function(text) {\r\n return String(text).replace(/<[^>]+>/gm, '');\r\n };\r\n })\r\n .filter('tel', function () {\r\n return function (tel) {\r\n if (!tel) { return ''; }\r\n\r\n var value = tel.toString().trim().replace(/^\\+/, '');\r\n\r\n if (value.match(/[^0-9]/)) {\r\n return tel;\r\n }\r\n\r\n var country, city, number;\r\n\r\n switch (value.length) {\r\n case 10: // +1PPP####### -> C (PPP) ###-####\r\n country = 1;\r\n city = value.slice(0, 3);\r\n number = value.slice(3);\r\n break;\r\n\r\n case 11: // +CPPP####### -> CCC (PP) ###-####\r\n country = value[0];\r\n city = value.slice(1, 4);\r\n number = value.slice(4);\r\n break;\r\n\r\n case 12: // +CCCPP####### -> CCC (PP) ###-####\r\n country = value.slice(0, 3);\r\n city = value.slice(3, 5);\r\n number = value.slice(5);\r\n break;\r\n\r\n default:\r\n return tel;\r\n }\r\n\r\n if (country === 1) {\r\n country = \"\";\r\n }\r\n\r\n number = number.slice(0, 3) + '-' + number.slice(3);\r\n\r\n return (country + \" (\" + city + \") \" + number).trim();\r\n };\r\n });","angular.module('core.providers', [])\r\n .provider('template', [function() {\r\n\r\n this.$get = function() {\r\n return {};\r\n };\r\n\r\n this.getTemplate = function(templateName) {\r\n var absurl = window.location.protocol + \"//\" + window.location.hostname + window.location.pathname;\r\n var indexOfAppRel = absurl.toLowerCase().indexOf(\"app_release\");\r\n var templateUrl = absurl.substring(0,indexOfAppRel) + \"templates/\" + templateName;\r\n return templateUrl;\r\n };\r\n\r\n }])\r\n .constant('templates', function(templateProvider) { return templateProvider; });","angular.module('services.browser', [])\r\n .factory('BrowserService', function ($window)\r\n {\r\n return {\r\n getBrowserType: function ()\r\n {\r\n var userAgent = $window.navigator.userAgent;\r\n var browsers = {chrome: /chrome/i, safari: /safari/i, firefox: /firefox/i, ie: /mozilla/i};\r\n for (var key in browsers) {\r\n if (browsers[key].test(userAgent)) {\r\n return key;\r\n }\r\n }\r\n return 'ie';\r\n }\r\n };\r\n });","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\nangular.module('services.bulkFuelPriceNotices', ['core.ajax']);\r\n\r\nangular.module('services.bulkFuelPriceNotices',[]).service('bulkFuelPriceNoticesService', function($q, apiService) {\r\n 'use strict';\r\n return {\r\n loadBulkFuelPrices: function(custKey, custLocKey, startDate, endDate) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetBulkFuelPriceNotices/',\r\n data: {\r\n CustKey:custKey,\r\n CustLocKey:custLocKey,\r\n StartDate:startDate,\r\n EndDate:endDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.contactUs', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.contactUs',[]).service('ContactUs', function($q, apiService, $filter) {\r\n 'use strict';\r\n return {\r\n loadContactUsContext: function() {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetContactUsContext/',\r\n data: {}\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n saveMessage: function(message) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/PostContactUsMessage/',\r\n data: message\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\nangular.module('services.customers', ['core.ajax']);\r\n\r\nangular.module('services.customers',[]).service('customerService', function($q, apiService) {\r\n 'use strict';\r\n function execute(apiSvcSettings, deferred){\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n }\r\n\r\n function executeAndNotify(apiSvcSettings, deferred){\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n }\r\n return {\r\n saveCustomerAccountSettings: function (custKey, contactKey, alertAmount, sendAlerts)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveCustomerARWebAccountSettings/',\r\n data: {\r\n CustomerKey: custKey,\r\n PrimaryContactKey: contactKey,\r\n AlertAmount: alertAmount,\r\n SendBalanceAlerts: sendAlerts\r\n }\r\n }\r\n );\r\n executeAndNotify(apiSvcSettings, deferred);\r\n return deferred.promise;\r\n },\r\n getCustomerLocations: function (custKey, locType) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCustomerLocations/',\r\n data: {\r\n CustKey:custKey,\r\n LocationType:locType\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n saveCustomerLocations: function (recStatus, location, custContKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveCustomerLocations/',\r\n data: {\r\n CustContKey: custContKey,\r\n RecStatus:recStatus,\r\n Location:location\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n services.documents MODULE\r\n ============================================================================= */\r\nangular.module('services.documents', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n DocumentService\r\n ============================================================================= */\r\nangular.module('services.documents', []).factory('documentService', function ($q, ajax, apiService)\r\n{\r\n\r\n 'use strict';\r\n return {\r\n getNotifications: function (custkey, custContKey, type, beginDate, endDate)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetNotificationsList/',\r\n data: {\r\n CustKey: custkey,\r\n CustContKey: custContKey === \"null\" ? null : custContKey,\r\n Type: type === \"null\" ? null : type,\r\n BeginDate: beginDate,\r\n EndDate: endDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getStatements: function (custkey, beginDate, endDate)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetStatementsList/',\r\n data: {\r\n CustKey: custkey,\r\n BeginDate: beginDate,\r\n EndDate: endDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n listDocuments: function (referenceNumber, description, startDate, endDate, customerKey, documentType, contactKey)\r\n {\r\n var deferred = $q.defer();\r\n var listAttachmentsCmdParms = {\r\n ReferenceNumber: referenceNumber,\r\n Description: description,\r\n StartDate: startDate,\r\n EndDate: endDate,\r\n CustomerKey: customerKey,\r\n DocumentType: documentType,\r\n ContactKey: contactKey\r\n };\r\n\r\n var apiSvcSettings = new ApiServiceSettings({\r\n method: 'POST',\r\n url: '../api/ListAttachments',\r\n data: listAttachmentsCmdParms\r\n });\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n var documetnList = data.Data;\r\n deferred.resolve(documetnList);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n Get1099AdviceList: function (cust, yb)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/Get1099AdviceList/',\r\n data: {\r\n CustKey: cust,\r\n YearsBack: yb\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","angular.module('services.edoc', ['core.ajax'])\n .service('EdocService', function ($q, apiService) {\n 'use strict';\n \n /**\n * the blob object is only valid for the window it is on,\n * once the window closes the url if captured is no longer valid\n * @param {any} edoc\n * @returns {blob}\n **/\n function createBlob(edoc) {\n var bytes = edoc.EdocStream;\n var type = edoc.MimeType;\n\n var raw = atob(bytes);\n var uint8Array = new Uint8Array(raw.length);\n for (var i = 0; i < raw.length; i++) {\n uint8Array[i] = raw.charCodeAt(i);\n }\n var blob = new Blob([uint8Array], { type: type });\n\n return blob;\n }\n\n /**\n * Takes the specified parameters and generates a edoc blob url\n * @param {number} edocKey\n * @returns {Promise}\n **/\n var renderEdoc = function (edocKey) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/EdocDetailsSecure',\n data: {\n EdocKey: edocKey\n }\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n }\n );\n return deferred.promise;\n };\n\n /**\n * Takes the specified parameters and generates a edoc blob url\n * @param {string} parameters\n * @returns {Promise}\n */\n var renderEdocByRefNo = function (parameters) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/EdocDetailsSecure/GetByRefNo',\n data: {\n Parameters: parameters\n }\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n }\n );\n return deferred.promise;\n };\n\n /**\n * Take the edoc stream and turn it into a blob url and then display it in our pdf viewer\n * If mime type is text/html then that means the document doesnt exist and we need to redirect \n * to the DocumentNotAvailable endpoint\n * @param {any} edoc\n * @returns {string}\n **/\n var createUrl = function (edoc){\n if (edoc) {\n var url;\n \n if (edoc.MimeType === 'text/html'){\n url = '../api/DocumentNotAvailable';\n return url;\n }\n \n var blob = createBlob(edoc);\n var file = URL.createObjectURL(blob);\n url = \"static/pdfjs/web/viewer.html?file=\" + encodeURIComponent(file);\n\n return url;\n }\n };\n\n return {\n renderEdoc: renderEdoc,\n renderEdocByRefNo: renderEdocByRefNo,\n createUrl: createUrl\n };\n });","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.encrypt', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.encrypt',[]).service('encryptData', function($q, apiService) {\r\n 'use strict';\r\n var encrypt = function(value) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/EncryptString/',\r\n data: {\r\n Value: value\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n };\r\n\r\n return {\r\n encrypt: encrypt\r\n };\r\n});","/* ==============================================================================\r\n\r\n SERVICES.FuelCards MODULE\r\n\r\n Defines the module namespace for the Fuel Cards services\r\n\r\n ============================================================================= */\r\nangular.module('services.FuelCards', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n FuelCards SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving data to the database.\r\n\r\n ============================================================================= */\r\nangular.module('services.FuelCards', [])\r\n .factory('FuelCardsService', function ($q, apiService)\r\n {\r\n 'use strict';\r\n function setDatesToNull(obj)\r\n {\r\n for (var prop in obj)\r\n {\r\n var value = obj[prop];\r\n if (typeof value === 'object')\r\n {\r\n setDatesToNull(value);\r\n }\r\n else\r\n {\r\n if (['1900-01-01T00:00:00', '0001-01-01T00:00:00', '2079-06-06T00:00:00'].indexOf(obj[prop]) > -1)\r\n obj[prop] = null;\r\n }\r\n }\r\n }\r\n\r\n return {\r\n getCards: function (customerContactKey, customerKey, cardFormat, cardNumDesc, isActive, isExpired, isPending, isLocked, isCancelled, department, template)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCards/',\r\n data: {\r\n CustomerContactKey: customerContactKey,\r\n CustomerKey: customerKey,\r\n CardFormatKey: cardFormat,\r\n CardNumDesc: cardNumDesc,\r\n IsActive: isActive,\r\n IsExpired: isExpired,\r\n IsPending: isPending,\r\n IsLocked: isLocked,\r\n IsCancelled: isCancelled,\r\n Department: department,\r\n Template: template\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n setDatesToNull(data.Data);\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getCardDetails: function (cardKey, canViewCardNumbers)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCardDetails/',\r\n data: {\r\n CardKey: cardKey,\r\n CanViewCardNumbers:canViewCardNumbers\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n setDatesToNull(data.Data);\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getCardsContext: function (customerKey, compKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCardsContext/',\r\n data: {\r\n CustomerKey: customerKey,\r\n CompanyKey: compKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getTaxAuthorities: function (custKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetTaxAuthorities/',\r\n data: {\r\n CustomerKey: custKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n addCard: function (recStatus, card, cardCF, custContKey)\r\n {\r\n setDatesToNull(card);\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveCards/',\r\n data: {\r\n Card: card,\r\n CardCF: cardCF,\r\n recStatus: recStatus,\r\n CustContKey: custContKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n saveCards: function (recStatus, card, cardCF, custContKey)\r\n {\r\n setDatesToNull(card);\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveCards/',\r\n data: {\r\n Card: card,\r\n CardCF: cardCF,\r\n recStatus: recStatus,\r\n CustContKey: custContKey\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getLookupPrices: function (custContKey, daysBack)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCardPriceNotices/',\r\n data: {\r\n CustContKey: custContKey,\r\n DaysBack: daysBack\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getPriceNoticesSettings: function (custContKey, cpPriceNoticeRuleKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPriceNoticesSettings/',\r\n data: {\r\n CustContKey: custContKey,\r\n CPPriceRuleKey: cpPriceNoticeRuleKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getSearchSites: function (custContKey, city, state, postal, limit)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetSearchSites/',\r\n data: {\r\n CustContKey: custContKey,\r\n City: city,\r\n State: state,\r\n Zip: postal,\r\n Limit: limit\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n savePriceNoticeSettings: function (custContKey, sites, groups, methods)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SavePriceNoticesSettings/',\r\n data: {\r\n CustContKey: custContKey,\r\n PriceNoticesSettingsSites: sites,\r\n PriceNoticesSettingsGroups: groups,\r\n PriceNoticesSettingsMethods: methods\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n blankLocation: {\r\n Key: 0,\r\n ID: '',\r\n Description: '',\r\n Address1: '',\r\n Address2: '',\r\n City: '',\r\n County: '',\r\n StateKey: 0,\r\n PostalCode: '',\r\n Active: -1,\r\n Name: '',\r\n Phone: '',\r\n PhoneFormatted: '',\r\n Email: ''\r\n },\r\n\r\n getCardsDepartments: function (custKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCardsDepartments/',\r\n data: {\r\n CustKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n saveCardsDepartments: function (recStatus, custKey, depts, fields, vals, custContKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveCardsDepartments/',\r\n data: {\r\n RecStatus: recStatus,\r\n CustKey: custKey,\r\n CustContKey: custContKey,\r\n Departments: depts,\r\n Fields: fields,\r\n Values: vals\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n });\r\n","/* ==============================================================================\nservices.globalizations.js MODULE\n============================================================================= */\nangular.module('services.globalizations', ['core.ajax']);\n\n/* ==============================================================================\nglobalizationSvc\n============================================================================= */\nangular.module('services.globalizations',[]).factory('globalizationSvc', function() {\n\n 'use strict';\n \n // Set the locale to the browser language, if it is null then set it to en-US\n var locale = (window.navigator.language === 'en-US' || window.navigator.language === 'fr-CA') ? window.navigator.language : 'en-US';\n\n return {\n getLocale: function () {\n return locale;\n },\n\n formatCurrency : function(num) {\n // Set the currency id based on the locale, default to USD\n var curID = (locale === 'fr-CA') ? 'CAD' : 'USD';\n\n return num.toLocaleString(locale, {style: 'currency', currency: curID});\n },\n\n formatNumeric: function (num, format) {\n return kendo.toString(num, format, locale);\n },\n\n // See https://docs.telerik.com/kendo-ui/globalization/intl/dateformatting for formats\n formatDateTime: function (dateString, format) {\n if (!dateString || dateString === \"\")\n {\n return \"\";\n }\n \n\n var date = new Date(dateString);\n return kendo.toString(date, format, locale);\n },\n\n convertStringToNumber: function (num) {\n if (typeof (num) === 'number')\n return num;\n\n if (locale === 'en-US') {\n num = num.replace(/[,$]/g, \"\");\n }\n else if (locale === 'fr-CA') {\n num = num.replace(/[$\\s]/g, \"\").replace(\",\", \".\");\n }\n\n return num;\n }\n };\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n services.home MODULE\r\n ============================================================================= */\r\nangular.module('services.home', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n homeService\r\n ============================================================================= */\r\nangular.module('services.home',[]).factory('homeService', function($q, ajax, apiService) {\r\n\r\n 'use strict';\r\n return{\r\n loadHomePageInformation : function(custContKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/Home/',\r\n data: {\r\n CustomerContactKey: custContKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","angular.module('services.localizations', [])\r\n .factory('localizationSvcFactory', function ($rootScope) {\r\n var _cachedLocalizations = [];\r\n\r\n var service = {\r\n setLocalizations: function (localizations) {\r\n _cachedLocalizations[localizations] = $rootScope.$eval(localizations);\r\n },\r\n setCachedLocalizations: function () {\r\n var localizationFilesContainer = $(\"#localizationFiles\");\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty(localizationFilesContainer)) {\r\n angular.forEach(localizationFilesContainer.children(), function (item) {\r\n _cachedLocalizations[item.id] = $rootScope.$eval(item.innerText);\r\n });\r\n }\r\n },\r\n getCachedLocalizationsContainer: function (page) {\r\n return {\r\n getLocalizedString: function (string, replacementParms) {\r\n var doesNotExist = angular.isUndefinedOrNullOrEmpty;\r\n\r\n var replaceString = function (result, replacementParms) {\r\n for (var i = 0; i < replacementParms.length; i++) {\r\n result = result.replace(\"{\" + i.toString() + \"}\", replacementParms[i]);\r\n }\r\n return result;\r\n };\r\n\r\n var decodeToUTF8 = function (text) {\r\n return text.replace(/&#(\\d+);/g, function (match, number) {\r\n return String.fromCharCode(number);\r\n });\r\n };\r\n\r\n var getCachedLocalizationsFor = function (page) {\r\n\r\n // load all the localizations defined in the index page\r\n if (doesNotExist(_cachedLocalizations)) {\r\n service.setCachedLocalizations();\r\n }\r\n\r\n var result = _cachedLocalizations[page];\r\n\r\n // if page not found in cache try to recreate it \r\n return result ? result : service.setLocalizations(page);\r\n };\r\n\r\n var fmtResult = function (r, rp) {\r\n return (rp && rp.constructor === Array) ? replaceString(r, rp) : r;\r\n };\r\n\r\n var getStringFrom = function (page) {\r\n return fmtResult(getCachedLocalizationsFor(page)[string], replacementParms);\r\n };\r\n\r\n var result = getStringFrom(page);\r\n\r\n // if we can't find the string check the shared AppLocalization\r\n result = result ? result : getStringFrom(['AppLocalization']);\r\n\r\n // if we found a string return its decoded version to UTF 8 otherwise return the id\r\n return result ? decodeToUTF8(result) : string;\r\n\r\n },\r\n stringFromCharacterEntity: function (str) {\r\n // If we need translated string for an input field (e.g. secret questions editable combo-box) \r\n // we can not use ng-bind-html or k-value-template that fixing encoding issues.\r\n // We need to fix encoding issues via this function. \r\n // If someone finds a better solution for fixing the encoding issue, where it will be possible to get directly corrected text, \r\n // do not hesitate and change this.\r\n return $('').html(str).text();\r\n }\r\n };\r\n }\r\n };\r\n\r\n return service;\r\n })\r\n .factory('localizationSvc', function (localizationSvcFactory)\r\n {\r\n return localizationSvcFactory;\r\n })\r\n .directive('pnLocalizationsSvc', function (templates, localizationSvc)\r\n {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n link: function (scope, element, attrs)\r\n {\r\n localizationSvc.setLocalizations(element.text().trim());\r\n },\r\n templateUrl: function(element, attrs) {\r\n return templates.getTemplate(attrs.moduleName);\r\n }\r\n };\r\n })\r\n .directive('pnLocalizations', function (templates, localizationSvcFactory)\r\n {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n controllerAs: 'pnLocalizationCtrl',\r\n link: function (scope, element, attrs)\r\n {\r\n scope.pnLocalizationCtrl.localizations.setLocalizations(element.text().trim());\r\n },\r\n templateUrl: function(element, attrs) {\r\n return templates.getTemplate(attrs.moduleName);\r\n },\r\n controller: function () {\r\n var self = this;\r\n self.$onInit = function () {\r\n self.localizations = localizationSvcFactory;\r\n };\r\n }\r\n };\r\n })\r\n .directive('pnTemplate', function (templates)\r\n {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: function(element, attrs) {\r\n return templates.getTemplate(attrs.templateName);\r\n }\r\n };\r\n })\r\n;","/* ==============================================================================\n services.logging MODULE\n ============================================================================= */\nangular.module('services.logging', ['core.ajax']);\n\n/* ==============================================================================\n LoggingService\n ============================================================================= */\nangular.module('services.logging', []).factory('LoggingService', function ($q, apiService) {\n 'use strict';\n\n return {\n logErrors: function(error) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/Logging/',\n data: {\n ExceptionMessage: error.ExceptionMessage,\n Stacktrace: error.Stacktrace\n }\n }\n );\n apiService.execute(apiSvcSettings).then(\n function(data) {\n deferred.resolve(data);\n }\n );\n return deferred.promise;\n }\n };\n});","/**\r\n * Created by jvitoria on 6/18/2015.\r\n */\r\n/* ==============================================================================\r\n services.orders MODULE\r\n ============================================================================= */\r\nangular.module('services.orders', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n ordersService\r\n ============================================================================= */\r\nangular.module('services.orders', [])\r\n .factory('ordersService', function ($q, ajax, apiService)\r\n {\r\n 'use strict';\r\n return {\r\n getOpenOrders: function getOpenOrders(custKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/GetOpenOrders/',\r\n data: {\r\n CustKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getOrderCustomerLocations: function getOrderCustomerLocations(custKey, requestedDeliveryDate) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/GetOrderCustomerLocations/',\r\n data: {\r\n CustKey: custKey,\r\n RequestedDeliveryDate: requestedDeliveryDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getOrdersContext: function getOrdersContext(custKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/GetOrdersContext/',\r\n data: {\r\n CustKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getOrderLocationInfo: function getOrderLocationInfo(custLocKey, requestedDeliveryDate)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/GetOrderLocationInfo/',\r\n data: {\r\n CustLocKey: custLocKey,\r\n RequestedDeliveryDate: requestedDeliveryDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getOrderDetails: function getOrderDetails(ordKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/GetOrderDetails/',\r\n data: {\r\n OrdKey: ordKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n saveOrderDetails: function saveOrderDetails(orderDetails)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/SaveOrderDetails/',\r\n data: {\r\n OrderDetails: orderDetails\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n blankOrderHeaderObj: function blankOrderHeaderObj()\r\n {\r\n return {\r\n Command: null,\r\n Comment: null,\r\n CustContKey: null,\r\n CustContName: null,\r\n CustContPhone: null,\r\n CustLocAddress: null,\r\n CustLocCity: null,\r\n CustLocDesc: null,\r\n CustLocKey: null,\r\n CustLocState: null,\r\n CustLocZip: null,\r\n Errors: [],\r\n LangID: 'EN',\r\n OrdCreatedByContKey: null,\r\n OrdDelivDirections: null,\r\n OrdDelivNotes: null,\r\n OrderDetails: [],\r\n OrdKey: null,\r\n OrdNumber: null,\r\n OrdStatus: null,\r\n OrdStatusKey: null,\r\n OrdType: 0,\r\n PONumber: null,\r\n ReqDelivDateTime: null,\r\n Timestamp: null\r\n };\r\n },\r\n\r\n blankOrderDetailsObj: function blankOrderDetailsObj()\r\n {\r\n return {\r\n CustFuelTankKey: null,\r\n ID: null,\r\n MaxVolume: null,\r\n OrderQty: 0,\r\n OrdFuelKey: null,\r\n OrdKey: null,\r\n Product: null,\r\n ProductKey: null,\r\n TankNumber: null,\r\n TimeStamp: null\r\n };\r\n }\r\n\r\n };\r\n });\r\n\r\n","angular.module('services.pages', ['core.ajax']);\nangular.module('services.pages', [])\n .factory('PagesService', function ($q, apiService) {\n 'use strict';\n var localCache = {};\n var Cache = {\n add: function (name, object, expiration) {\n var exp = expiration || 0;\n var now = new Date().getTime();\n localCache[name] = {\n data: object,\n inserted: now,\n expiration: (exp === 0) ? 0 : (now + exp * 1000)\n };\n },\n get: function (name) {\n var now = new Date().getTime();\n if (\n (Object.keys(localCache).indexOf(name) !== -1 && localCache[name].expiration === 0) || (Object.keys(localCache).indexOf(name) !== -1 && localCache[name].expiration > now)\n ) {\n return localCache[name].data;\n }\n else {\n //remove expired object from cache\n if (Object.keys(localCache).indexOf(name) !== -1) {\n delete localCache[name];\n }\n return null;\n }\n },\n exists: function (name) {\n var now = new Date().getTime();\n // if object exists and expiration is 0 (never expires) return true\n // if object exists and expiration is above NOW, return true\n // if object exists and expiration is bellow NOW return false and force services to retrieve new data\n return (\n (Object.keys(localCache).indexOf(name) !== -1 && localCache[name].expiration === 0) || (Object.keys(localCache).indexOf(name) !== -1 && localCache[name].expiration > now)\n ) ? true : false;\n }\n };\n return {\n getWebProfileSiteLayout: function (profileKey) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'GET',\n url: '../api/GetWebProfileSiteLayout/' + profileKey + '/',\n skipValidations: true\n }\n );\n if (Cache.exists(\"getWebProfileSiteLayout\")) {\n deferred.resolve(Cache.get(\"getWebProfileSiteLayout\"));\n }\n else {\n apiService.execute(apiSvcSettings).then(\n function (data) {\n Cache.add(\"getWebProfileSiteLayout\", data.Data);\n deferred.resolve(data.Data);\n },\n function (data) {\n deferred.reject(data.ErrorMessages);\n }\n );\n }\n return deferred.promise;\n },\n getAccessToken: function (profileKey, nodeKey) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'GET',\n url: '../api/GetAccessToken/' + profileKey + '/' + nodeKey + '/',\n skipValidations: true\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n },\n function (data) {\n deferred.reject(data.ErrorMessages);\n }\n );\n return deferred.promise;\n }\n };\n });\n","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.paperwork', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.paperwork',[]).factory('PaperworkService', function($q, apiService, $filter, $rootScope) {\r\n 'use strict';\r\n return{\r\n getPaperworkContext : function(customerContactKey, ignoreStatus){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkContext/',\r\n data: {\r\n CustomerContactKey:customerContactKey,\r\n IgnoreStatus: ignoreStatus\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getNextPaperworkDate : function(siteKey, ignoreStatus){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetNextPaperworkDate/',\r\n data: {\r\n SiteKey: siteKey,\r\n IgnoreStatus: ignoreStatus\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data.NextPaperworkDate);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getPaperworkBatchesByDate : function(siteKey, startDate, endDate, unposted){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkBatchesByDate/',\r\n data: {\r\n SiteKey:siteKey,\r\n StartDate:startDate,\r\n EndDate:endDate,\r\n Unposted:unposted\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data.PaperworkBatches);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n OpenPaperworkBatch : function(siteKey, paperworkDate, customerContactKey, emailAddress, readOnly){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkBatchForEdit/',\r\n data: {\r\n BatchKey : 0,//Batch key is 0 to ensure the paperwork opens by site and date.(New Paperwork)\r\n SiteKey : typeof(siteKey) === \"object\" ?\r\n typeof(siteKey.SiteKey) === \"number\" ? siteKey.SiteKey : 0 :\r\n typeof(siteKey) === \"number\" ? siteKey : 0,\r\n PaperworkDate : paperworkDate,\r\n ContactKey: customerContactKey,\r\n EmailAddress : emailAddress,\r\n ReadOnly : readOnly\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n OpenPaperworkBatchByKey : function(batchKey, customerContactKey, emailAddress, readonly){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkBatchForEditByKey/',\r\n data: {\r\n BatchKey : batchKey,\r\n ContactKey: customerContactKey,\r\n EmailAddress : emailAddress,\r\n ReadOnly : readonly\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n SubmitPaperwork : function(submitPaperworkCmdParms){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SubmitPaperworkBatch/',\r\n data: submitPaperworkCmdParms\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n $rootScope.$broadcast('event:PaperworkSubmitted', {});\r\n deferred.resolve(data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n GetPaperworkBatchErrorWarning: function (submitPaperworkCmdParms) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkBatchErrorWarning/',\r\n data: submitPaperworkCmdParms\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n ValidatePaperworkSiteDateForContact : function(siteKey, paperworkDate, customerContactKey, forEntry){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/ValidatePaperworkSiteDateForContact/',\r\n data: {\r\n SiteKey : siteKey,\r\n PaperworkDate : paperworkDate,\r\n ContactKey: customerContactKey,\r\n ForEntry: forEntry\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n RefreshPaperworkLock: function (paperworkBatchKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/RefreshPaperworkLock/',\r\n data: {\r\n PaperworkBatchKey: paperworkBatchKey,\r\n RefreshLock: true\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkDealerForms', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkDealerForms',[]).service('PaperworkDealerFormsService', function($q, apiService, $filter) {\r\n 'use strict';\r\n var netReadings = 0;\r\n var beginningAndEndingReadings = 1;\r\n var calculatedBasedOnUnitsAndPerUnitAmount = 2;\r\n\r\n return {\r\n loadDealerForms: function (paperworkBatchKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkDealerForms/',\r\n data: {\r\n PaperworkBatchKey:paperworkBatchKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n saveDealerForms:function(header, forms){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SavePaperworkDealerForms/',\r\n data: {\r\n DealerFormsHeader:header,\r\n DealerForms:forms\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkTanks', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkDeliveries',[]).service('PaperworkDeliveriesService', function($q, apiService, $filter) {\r\n 'use strict';\r\n\r\n return {\r\n getDeliveriesWithContext: function (paperworkBatchKey ,forViewOnly) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetPaperworkDeliveriesWithContext/',\r\n params: { paperworkBatchKey: paperworkBatchKey, forViewOnly: forViewOnly }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getDelivery: function (deliveryKey, paperworkBatchKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetPaperworkDelivery/',\r\n params: { deliveryKey: deliveryKey, paperworkBatchKey: paperworkBatchKey }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getSiteFuelAuthorizedOrigins: function (paperworkBatchKey, vendorKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetSiteFuelAuthorizedOrigins/',\r\n params: { paperworkBatchKey: paperworkBatchKey, vendorKey: vendorKey }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n savePaperworkDelivery: function(deliveryHeader, delivery) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SavePaperworkDelivery/',\r\n data: {\r\n DeliveryHeader: deliveryHeader,\r\n FuelDelivery: delivery\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n deletePaperworkDelivery: function(delivery, paperworkBatchKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/DeletePaperworkDelivery/',\r\n params: { paperworkBatchKey: paperworkBatchKey },\r\n data: delivery\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\nangular.module('services.paperworkMeters', ['core.ajax'])\r\n\r\n.service('PaperworkMetersService', function($q, apiService, globalizationSvc) {\r\n 'use strict';\r\n\r\n var beginningAndEndingReadings = 1;\r\n var calculatedBasedOnUnitsAndPerUnitAmount = 2;\r\n\r\n function calculateNet(begin, end)\r\n {\r\n begin = globalizationSvc.convertStringToNumber(begin);\r\n end = globalizationSvc.convertStringToNumber(end);\r\n var diff = end - begin;\r\n\r\n if(parseFloat(end) < parseFloat(begin))\r\n {\r\n var max = begin.toString();\r\n var nMax = \"\";\r\n for(var i = 0;i< max.length; i++)\r\n {\r\n if(max[i] === \".\")\r\n break;\r\n nMax += \"9\";\r\n }\r\n var dMax = parseFloat(nMax) + 1;//Will wound to the next whole \"10\" id 99 to 100.\r\n diff = dMax - begin + end;\r\n }\r\n return parseFloat(diff);\r\n }\r\n\r\n return {\r\n loadMetersForEntry: function (paperworkBatchKey, profitcenterKey, paperworkDate) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkMeters/',\r\n data: {\r\n ProfitCenterKey:profitcenterKey,\r\n PaperworkDate:paperworkDate,\r\n PaperworkBatchKey:paperworkBatchKey\r\n\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n netAmountCalc: function (meter) {\r\n if (meter.FuelPositionDollarReading !== calculatedBasedOnUnitsAndPerUnitAmount) return;\r\n var netUnits = globalizationSvc.convertStringToNumber(meter.NetUnits);\r\n var rtlPrice = globalizationSvc.convertStringToNumber(meter.RtlPrice);\r\n if (netUnits > 0 && rtlPrice > 0) {\r\n meter.NetAmount = rtlPrice * netUnits;\r\n }\r\n },\r\n calcPerUnit: function (meter, priceToleranceAmount, checkRetailPrice, checkAveragePrice, showRtlPrice) {\r\n //Check average price * compare to previous value\r\n var netUnits = globalizationSvc.convertStringToNumber(meter.NetUnits);\r\n var netAmounts = globalizationSvc.convertStringToNumber(meter.NetAmount);\r\n var rtlPrice = globalizationSvc.convertStringToNumber(meter.RtlPrice);\r\n if (netUnits > 0 && netAmounts > 0) {\r\n meter.CalcPrice = netAmounts / netUnits;\r\n } else {\r\n // If retail price is available then fall back to that like FIME \r\n // Otherwise set the average to zero so we dont give them a bad calculation\r\n if (rtlPrice > 0 && showRtlPrice) {\r\n meter.CalcPrice = rtlPrice;\r\n } else {\r\n meter.CalcPrice = 0;\r\n }\r\n }\r\n },\r\n calculateNetAmountFromEnd: function (meter, index) {\r\n if (meter.FuelPositionDollarReading !== beginningAndEndingReadings) { return; }\r\n\r\n meter.NetAmount = calculateNet(meter.BeginAmount, meter.EndAmount);\r\n },\r\n calculateNetUnitsFromEnd: function (meter, index) {\r\n if (meter.FuelPositionUnitReading !== beginningAndEndingReadings) { return; }\r\n\r\n meter.NetUnits = calculateNet(meter.BeginUnits, meter.EndUnits);\r\n },\r\n calculatePageAmountTotals: function (meters) {\r\n var totalDollar = 0.0;\r\n meters.forEach((meter) => {\r\n var theVal = globalizationSvc.convertStringToNumber(meter.NetAmount);\r\n var pumpTestVal = globalizationSvc.convertStringToNumber(meter.TestAmount);\r\n totalDollar = totalDollar + parseFloat(theVal) - parseFloat(pumpTestVal);\r\n });\r\n return totalDollar;\r\n },\r\n calculatePageUnitTotals: function (meters) {\r\n var totalUnits = 0.0;\r\n meters.forEach((meter) => {\r\n var theVal = globalizationSvc.convertStringToNumber(meter.NetUnits);\r\n var pumpTestVal = globalizationSvc.convertStringToNumber(meter.TestUnits);\r\n totalUnits = totalUnits + parseFloat(theVal) - parseFloat(pumpTestVal);\r\n });\r\n return totalUnits;\r\n },\r\n updateMeters: function (meters) {\r\n meters.forEach((meter) => {\r\n meter.BeginUnits = typeof(meter.BeginUnits) === 'string' ? globalizationSvc.convertStringToNumber(meter.BeginUnits) : meter.BeginUnits;\r\n meter.BeginAmount = typeof(meter.BeginAmount) === 'string'? globalizationSvc.convertStringToNumber(meter.BeginAmount) : meter.BeginAmount;\r\n meter.TestUnits = typeof(meter.TestUnits) === 'string' ? globalizationSvc.convertStringToNumber(meter.TestUnits) : meter.TestUnits;\r\n meter.TestAmount = typeof(meter.TestAmount) === 'string' ? globalizationSvc.convertStringToNumber(meter.TestAmount) : meter.TestAmount;\r\n });\r\n },\r\n savePaperworkMeters: function(meterHeaders, meters)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SavePaperworkMeters/',\r\n data: {\r\n PaperworkMeterHeader: meterHeaders,\r\n PaperworkMeters: meters\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\n * Created by mmagic on 06/02/2022.\n */\n/* ==============================================================================\n\n SERVICES.PaperworkReports MODULE\n\n Defines the module namespace for the paperwork reports services\n\n ============================================================================= */\nangular.module('services.paperworkReports', ['core.ajax'])\n\n/* ==============================================================================\n\n Paperwork Reports SERVICE\n\n Contains services that retrieving paperwork reports.\n\n ============================================================================= */\n.service('PaperworkReportsService', function($q, apiService) {\n 'use strict';\n\n return {\n getPaperworkReports: function (customerContactKey) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/GetPaperworkReports/',\n data: {\n CustomerContactKey: customerContactKey\n },\n skipValidations: true\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n }\n );\n return deferred.promise;\n },\n\n getPaperworkReportSites: function (reportName, customerContactKey) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/GetPaperworkReportSites/',\n data: {\n ReportName: reportName,\n CustomerContactKey: customerContactKey\n },\n skipValidations: true\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n }\n );\n return deferred.promise;\n }\n };\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkTanks', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkTanks',[]).service('PaperworkTanksService', function($q, apiService, $filter) {\r\n 'use strict';\r\n var netReadings = 0;\r\n var beginningAndEndingReadings = 1;\r\n var calculatedBasedOnUnitsAndPerUnitAmount = 2;\r\n\r\n function unFormatNumber(number)\r\n {\r\n if(number.toString().indexOf(',') > -1) {\r\n number = number.replace( /,/g , \"\");\r\n }\r\n if(number.toString().indexOf('$') > -1) {\r\n number = number.replace( /\\$/g , \"\");\r\n }\r\n if(number.length === 0)// || isNaN(number))\r\n return \"0\";\r\n return number;\r\n }\r\n function convertTemp(temp, siteUOM, tankUOM){\r\n if(siteUOM === tankUOM) return temp;//no conversion necessary.\r\n if(tankUOM === 0) return (temp * 1.8) + 32; //Convert c to fl\r\n return (temp - 32) * 0.5555555556;//Convert f to c\r\n }\r\n function convertLinearUnits(units, siteUOM, tankUOM){\r\n if(siteUOM === tankUOM) return units;//no conversion necessary.\r\n if(tankUOM === 0) return units * 0.3937; //Convert cm to in\r\n return units * 2.54;//Convert in to cm\r\n }\r\n function convertVolumeToSiteUnits(units, siteUOM, tankUOM){\r\n if(siteUOM === tankUOM) return units;//no conversion necessary.\r\n if(siteUOM === 0) return units * 0.264172; //Convert liters to gal\r\n return units * 3.785412;//Convert gal to liters\r\n }\r\n function getVolume(tankCharts, tank, depth){\r\n var tankUOM = tank.UnitOfMeasure;\r\n var siteUOM = tank.MeasurementType;\r\n var tankChartKey = tank.TankTypeKey;\r\n var tankChart = tankCharts[tankChartKey + \"\"];\r\n\r\n var tankTypeUnits = convertLinearUnits(depth, siteUOM, tankUOM);\r\n var nStr = tankTypeUnits + '';\r\n var x = nStr.split('.');\r\n var wholeNumber = parseInt(x[0], 10) - 1;//subtract 1 from actual number to get index.\r\n var decimalNumber = parseFloat(x.length > 1 ? '0.' + x[1] : '0.0');//Partial units.\r\n var baseAmount = 0;\r\n var partialAmount = 0.00;\r\n if(wholeNumber > 0 && wholeNumber < tankChart.length) {\r\n baseAmount = tankChart[wholeNumber].Volume;\r\n }\r\n if(decimalNumber > 0 && (wholeNumber + 1) < tankChart.length){\r\n var nextAmount = tankChart[wholeNumber + 1].Volume;\r\n var avg = nextAmount - baseAmount;\r\n partialAmount = avg * decimalNumber;\r\n }\r\n if(wholeNumber >= tankChart.length)\r\n baseAmount = tankChart[tankChart.length-1].Volume;\r\n var units = baseAmount + partialAmount;\r\n return convertVolumeToSiteUnits(units, siteUOM, tankUOM);\r\n }\r\n return {\r\n loadTanks: function (paperworkBatchKey, siteKey, paperworkDate) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkTanks/',\r\n data: {\r\n PaperworkBatchKey:paperworkBatchKey,\r\n SiteKey:siteKey,\r\n PaperworkDate:paperworkDate\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n calculateTankDepth: function(tank, isMetric){\r\n var base = isMetric?100:12;\r\n var units = (tank.LargeUnits * base) +\r\n tank.SmallUnits +\r\n tank.PartialUnits;\r\n return units;\r\n },\r\n calculateWaterDepth: function(tank){\r\n var units = tank.WaterSmallUnits +\r\n tank.WaterPartialUnits;\r\n return units;\r\n },\r\n getVolumeFromTankChart: function(tank, tankCharts){\r\n return getVolume(tankCharts, tank, tank.Depth);\r\n },\r\n getMaxVolumeFromTankChart: function (tank, tankCharts) {\r\n var tankUOM = tank.UnitOfMeasure;\r\n var siteUOM = tank.MeasurementType;\r\n var tankChartKey = tank.TankTypeKey;\r\n var tankChart = tankCharts[tankChartKey + \"\"];\r\n var maxVolume = tankChart[tankChart.length - 1].Volume;\r\n return convertVolumeToSiteUnits(maxVolume, siteUOM, tankUOM);\r\n },\r\n getWaterVolumeFromTankChart: function(tank, tankCharts){\r\n return getVolume(tankCharts, tank, tank.WaterDepth);\r\n },\r\n adjustVolumeForTemperature: function(useTempCorrections, tank, tempCharts){\r\n if(!useTempCorrections || tank.TmpChartKey <= 0)\r\n return tank.Quantity;\r\n //var tankUOM = tank.UnitOfMeasure;\r\n //var siteUOM = tank.MeasurementType;\r\n var temperature = tank.Temperature;//$scope.convertTemp(tank.Temperature,siteUOM,tankUOM);\r\n var tmpChartKey = tank.TmpChartKey;\r\n var tempChart = tempCharts[tmpChartKey + \"\"];\r\n var conversionFactor = 1;\r\n for(var x=0; x= temperature){//look for the temperature or the next greatest temperature.\r\n conversionFactor = tempChart[x].ConvFactor;\r\n break;\r\n }\r\n conversionFactor = tempChart[x].ConvFactor;//This will set it to the max conversion factor if none is found.\r\n }\r\n var qty = tank.Quantity;\r\n var wQty = tank.WaterQuantity;\r\n if(tank.TmpChartUseNetQty)\r\n return ((qty - wQty) / conversionFactor) + wQty;\r\n return qty / conversionFactor;\r\n\r\n },\r\n savePaperworkTanks: function(tankHeaders, tanks) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SavePaperworkTanks/',\r\n data: {\r\n PaperworkTankHeader: tankHeaders,\r\n PaperworkTanks: tanks\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.payments', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.payments',[]).factory('PaymentService', function($q, ajax, apiService, $rootScope) {\r\n\r\n 'use strict';\r\n return{\r\n getPayment : function(customerKey, webPaymentKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {\r\n method:'POST',\r\n url:'../api/RetrieveWebPayment/',\r\n data: {\r\n CustomerKey:customerKey,\r\n WebPaymentKey:webPaymentKey\r\n }\r\n };\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n // Let's return our promise back to the caller\r\n return deferred.promise;\r\n },\r\n getBudgetPaymentContext: function (customerKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {\r\n method: 'POST',\r\n url: '../api/BudgetWebPaymentContext/',\r\n data: {\r\n CustomerKey: customerKey\r\n }\r\n };\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n savePayment : function(payment){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {\r\n method:'POST',\r\n url:'../api/WebPayment/',\r\n data: {\r\n CustomerScheduledPayment : payment.CustomerScheduledPayment,\r\n Invoices : payment.Invoices,\r\n Credits : payment.Credits\r\n }\r\n };\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getScheduledPaymentHistoryContext: function(customerKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {\r\n method:'POST',\r\n url:'../api/WebPaymentHistoryContext/',\r\n data: {\r\n CustomerKey:customerKey\r\n }\r\n };\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getScheduledPayments: function(customerKey, accountKey, startDate, endDate, scheduled, processed, cancelled){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {\r\n method:'POST',\r\n url:'../api/WebPaymentHistory/',\r\n data: {\r\n CustomerKey: customerKey,\r\n AccountKey: accountKey,\r\n StartDate: startDate,\r\n EndDate: endDate,\r\n Scheduled: scheduled,\r\n Canceled: cancelled,\r\n Processed: processed\r\n }\r\n };\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n lockPayments: function (custContKey, emailAddress, custKey, skipBroadcast) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/LockCustomerPayments/',\r\n data: {\r\n CustContKey: custContKey,\r\n EmailAddress: emailAddress,\r\n CustomerKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n if(data.Data.CmdSuccess)\r\n {\r\n if (!skipBroadcast) { $rootScope.$broadcast('event:PaymentLocked', { CustContKey: custContKey, EmailAddress: emailAddress, CustomerKey: custKey }); }\r\n deferred.resolve(data.Data);\r\n }else{\r\n deferred.reject(data.Data);\r\n }\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n unLockPayments: function(custContKey, emailAddress, custKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/UnLockCustomerPayments/',\r\n data: {\r\n CustContKey: custContKey,\r\n EmailAddress: emailAddress,\r\n CustomerKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n $rootScope.$broadcast('event:PaymentUnlocked', {});\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n lockInvoices: function (custContKey, emailAddress, custKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/LockCustomerInvoices/',\r\n data: {\r\n CustContKey: custContKey,\r\n EmailAddress: emailAddress,\r\n CustomerKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n if(data.Data.CmdSuccess)\r\n {\r\n $rootScope.$broadcast('event:InvoiceLocked', { CustContKey: custContKey, EmailAddress: emailAddress, CustomerKey: custKey });\r\n deferred.resolve(data.Data);\r\n }else{\r\n deferred.reject(data.Data);\r\n }\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n unockInvoices: function(custContKey, emailAddress, custKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/UnLockCustomerInvoices/',\r\n data: {\r\n CustContKey: custContKey,\r\n EmailAddress: emailAddress,\r\n CustomerKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n $rootScope.$broadcast('event:InvoiceUnlocked', {});\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n lockPaymentsAndInvoices: function (custContKey, emailAddress, custKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/LockBothPaymentsAndInvoices/',\r\n data: {\r\n CustContKey: custContKey,\r\n EmailAddress: emailAddress,\r\n CustomerKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n if (data.Data.CmdSuccess) {\r\n deferred.resolve(data.Data);\r\n } else {\r\n deferred.reject(data.Data);\r\n }\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getTermsAndConditions: function(termsKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/GetLegalTerms/',\r\n data: {\r\n LegalTermKey: termsKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n ); return deferred.promise;\r\n },\r\n acceptTermsAndConditions: function(termsKey, custKey, contactKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/AcceptLegalTerms/',\r\n data: {\r\n LegalTermKey: termsKey,\r\n CustomerKey: custKey,\r\n CustomerContactKey: contactKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n ); return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n Profile SERVICE\r\n\r\n Contains the core profile related code\r\n\r\n ============================================================================= */\r\nangular.module('services.WebProfile', ['core.ajax']);\r\n\r\nangular.module('services.WebProfile', []).factory('WebProfileService', function ($q, $rootScope, ajax, apiService)\r\n{\r\n 'use strict';\r\n function retrieveWebProfileFromAPI(profile)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/WebProfile/',\r\n data: {\r\n WebProfileKey: profile\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n\r\n function retrieveWebProfileMessageFromAPI(webProfileKey, messageType)\r\n {\r\n var deferred = $q.defer();\r\n\r\n if (webProfileKey.toNumber() < 1)\r\n {\r\n deferred.resolve({\r\n Key: 0,\r\n Text: '',\r\n Timestamp: null,\r\n Type: null,\r\n WebProfileKey: 0\r\n });\r\n }\r\n else\r\n {\r\n var ca = ($rootScope.$$childHead.appInfo && $rootScope.$$childHead.appInfo.webUser && $rootScope.$$childHead.appInfo.webUser.CurrentAuthorization) ?\r\n $rootScope.$$childHead.appInfo.webUser.CurrentAuthorization : null;\r\n var custKey = ca ? ca.CustKey : null;\r\n var contactKey = ca ? ca.CustContKey : null;\r\n\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/WebProfileMessage/',\r\n data: {\r\n WebProfileKey: webProfileKey,\r\n MessageType: messageType,\r\n CustomerKey: custKey,\r\n ContactKey: contactKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data.WebProfileMessage);\r\n }\r\n );\r\n }\r\n\r\n return deferred.promise;\r\n }\r\n\r\n function iniializeFromApi()\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {};\r\n\r\n apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/Init/',\r\n params: {}\r\n });\r\n\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n\r\n return deferred.promise;\r\n }\r\n\r\n function getWebAudits(beginDate, endDate, menuCode, includeAdds, includeChanges, includeDeletes, includeEvents, custKey, nameEmail)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetWebAuditEntries/',\r\n data: {\r\n BeginDate : beginDate,\r\n EndDate: endDate,\r\n MenuCode: menuCode,\r\n IncludeAdds: includeAdds,\r\n IncludeChanges: includeChanges,\r\n IncludeDeletes: includeDeletes,\r\n IncludeEvents: includeEvents,\r\n CustKey: custKey,\r\n NameEmail: nameEmail,\r\n MaxRows: 500\r\n }\r\n });\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n\r\n return deferred.promise;\r\n }\r\n\r\n function getARCustWebSheet()\r\n {\r\n return [].slice.call(document.styleSheets).find({title: \"ARCustWebCSS\"});\r\n }\r\n\r\n function setProfileColor(pcolor)\r\n {\r\n if (!$rootScope.profileClasses) {\r\n $rootScope.profileClasses = [];\r\n }\r\n else {\r\n resetStyle('backgroundColor', \"rgb(254, 254, 254)\", $rootScope.profileClasses);\r\n resetStyle('color', \"rgb(254, 254, 254)\", $rootScope.profileClasses);\r\n }\r\n cssOverrideStyle('backgroundColor', \"rgb(254, 254, 254)\", '#' + pcolor, $rootScope.profileClasses);\r\n cssOverrideStyle('color', \"rgb(254, 254, 254)\", '#' + pcolor, $rootScope.profileClasses);\r\n }\r\n\r\n function setLandingColor(pcolor)\r\n {\r\n if (!$rootScope.landingClasses) {\r\n $rootScope.landingClasses = [];\r\n }\r\n else {\r\n if ($rootScope.profileClasses) {\r\n resetStyle('backgroundColor', \"rgb(254, 254, 254)\", $rootScope.profileClasses);\r\n resetStyle('color', \"rgb(254, 254, 254)\", $rootScope.profileClasses);\r\n }\r\n resetStyle('backgroundColor', \"rgb(253, 253, 253)\", $rootScope.landingClasses);\r\n resetStyle('color', \"rgb(253, 253, 253)\", $rootScope.landingClasses);\r\n }\r\n\r\n cssOverrideStyle('backgroundColor', \"rgb(253, 253, 253)\", '#' + pcolor, $rootScope.landingClasses);\r\n cssOverrideStyle('color', \"rgb(253, 253, 253)\", '#' + pcolor, $rootScope.landingClasses);\r\n }\r\n\r\n function cssOverrideStyle(attribute, match, value, classNames)\r\n {\r\n var pdiSheet = getARCustWebSheet();\r\n if (!angular.isUndefinedOrNullOrEmpty(pdiSheet)) {\r\n var rules = pdiSheet.cssRules || pdiSheet.rules;\r\n for (var i = 0; i < rules.length; ++i) {\r\n if (!angular.isUndefinedOrNullOrEmpty(rules[i].style) && rules[i].style[attribute] === match) {\r\n rules[i].style[attribute] = value;\r\n classNames.push([rules[i].selectorText, rules[i].style[attribute]]);\r\n }\r\n }\r\n }\r\n else\r\n $scope.notifier.show('Stylesheet could not be loaded.', 'error');\r\n\r\n }\r\n\r\n function resetStyle(attribute, match, classNames)\r\n {\r\n var pdiSheet = getARCustWebSheet();\r\n if (!angular.isUndefinedOrNullOrEmpty(pdiSheet)) {\r\n var rules = pdiSheet.cssRules || pdiSheet.rules;\r\n for (var x = 0; x < classNames.length; x++) {\r\n for (var i = 0; i < rules.length; ++i) {\r\n if (!angular.isUndefinedOrNullOrEmpty(rules[i].style) && rules[i].selectorText === classNames[x][0] && rules[i].style[attribute] === classNames[x][1]) {\r\n rules[i].style[attribute] = match;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function cssOverrideAllStyle(attribute, value)\r\n {\r\n var pdiSheet = getARCustWebSheet();\r\n if (!angular.isUndefinedOrNullOrEmpty(pdiSheet)) {\r\n var rules = pdiSheet.cssRules || pdiSheet.rules;\r\n\r\n for (var i = 0; i < rules.length; ++i) {\r\n if (attribute in rules[i].style)\r\n rules[i].style[attribute] = value;\r\n }\r\n }\r\n }\r\n\r\n function cssAddStyle(selector, attribute, value)\r\n {\r\n var pdiSheet = getARCustWebSheet();\r\n if (!angular.isUndefinedOrNullOrEmpty(pdiSheet)) {\r\n var rules = pdiSheet.cssRules || pdiSheet.rules;\r\n var index = rules.length;\r\n\r\n if (\"insertRule\" in pdiSheet) {\r\n pdiSheet.insertRule(selector + \"{ \" + attribute + \": \" + value + \" }\", index);\r\n }\r\n else {\r\n pdiSheet.addRule(selector, attribute + \": \" + value, index);\r\n }\r\n }\r\n }\r\n\r\n return {\r\n setProfileColor: setProfileColor,\r\n setLandingColor: setLandingColor,\r\n setWebProfile: function (profile)\r\n {\r\n var deferred = $q.defer();\r\n if (amplify.store(\"pnprofile\")) {\r\n setLandingColor(amplify.store(\"pnprofile\").ArWebProfile.PrimaryColor);\r\n deferred.resolve(amplify.store(\"pnprofile\"));\r\n } else {\r\n retrieveWebProfileFromAPI(profile).then(function (data)\r\n {\r\n var webProfileWithContext = angular.fromJson(JSON.parse(data)).WebProfileWithContext;\r\n setLandingColor(webProfileWithContext.ArWebProfile.PrimaryColor);\r\n amplify.store(\"pnprofile\", webProfileWithContext);\r\n deferred.resolve(webProfileWithContext);\r\n });\r\n }\r\n return deferred.promise;\r\n },\r\n initialize: function ()\r\n {\r\n var deferred = $q.defer();\r\n var sCfg;\r\n var timeout = parseInt(20, 10) * 60 * 1000;\r\n\r\n iniializeFromApi().then(function (data)\r\n {\r\n sCfg = data.Configuration;\r\n setLandingColor(sCfg.LandingPrimaryColor);\r\n timeout = parseInt(sCfg.Timeout, 10) * 60 * 1000;\r\n $rootScope.timeout = timeout;\r\n deferred.resolve(data);\r\n });\r\n \r\n return deferred.promise;\r\n },\r\n initializeSiteDisabled: function ()\r\n {\r\n var deferred = $q.defer();\r\n\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetSiteDisabledSystemSettings/',\r\n params: {}\r\n });\r\n\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n setLandingColor(data.Data.Configuration.LandingPrimaryColor);\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n\r\n return deferred.promise;\r\n },\r\n getWebProfileMessage: function (webProfileKey, messageType)\r\n {\r\n var deferred = $q.defer();\r\n {\r\n retrieveWebProfileMessageFromAPI(webProfileKey, messageType).then(function (data)\r\n {\r\n deferred.resolve(data.Text);\r\n });\r\n }\r\n return deferred.promise;\r\n },\r\n getWebAudits: getWebAudits\r\n };\r\n});\r\n","angular.module('services.reporting', ['core.ajax'])\n.service('reportingService', function ($q, apiService) {\n 'use strict';\n\n function renderReportApi (parameters) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/RenderSSRS',\n data: {\n Parameters: parameters\n }\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n }\n );\n return deferred.promise;\n }\n\n /**\n * the blob object is only valid for the window it is on,\n * once the window closes the url if captured is no longer valid\n * @param {any} report\n **/\n function createBlob(report) {\n var bytes = report.ReportBytes;\n var type = report.MimeType;\n\n var raw = atob(bytes);\n var uint8Array = new Uint8Array(raw.length);\n for (var i = 0; i < raw.length; i++) {\n uint8Array[i] = raw.charCodeAt(i);\n }\n var blob = new Blob([uint8Array], { type: type });\n\n return blob;\n }\n\n function download(blobUrl, filename) {\n var a = document.createElement(\"a\");\n if (a.click) {\n // Use a.click() if available. Otherwise, Chrome might show\n // \"Unsafe JavaScript attempt to initiate a navigation change\n // for frame with URL\" and not open the PDF at all.\n // Supported by (not mentioned = untested):\n // - Firefox 6 - 19 (4- does not support a.click, 5 ignores a.click)\n // - Chrome 19 - 26 (18- does not support a.click)\n // - Opera 9 - 12.15\n // - Internet Explorer 6 - 10\n // - Safari 6 (5.1- does not support a.click)\n a.href = blobUrl;\n a.target = \"_parent\";\n // Use a.download if available. This increases the likelihood that\n // the file is downloaded instead of opened by another PDF plugin.\n if (\"download\" in a) {\n a.download = filename;\n }\n // must be in the document for IE and recent Firefox versions.\n // (otherwise .click() is ignored)\n (document.body || document.documentElement).appendChild(a);\n a.click();\n a.parentNode.removeChild(a);\n } else {\n if (window.top === window &&\n blobUrl.split(\"#\")[0] === window.location.href.split(\"#\")[0]) {\n // If _parent == self, then opening an identical URL with different\n // location hash will only cause a navigation, not a download.\n var padCharacter = blobUrl.indexOf(\"?\") === -1 ? \"?\" : \"&\";\n blobUrl = blobUrl.replace(/#|$/, padCharacter + \"$&\");\n }\n window.open(blobUrl, \"_parent\");\n }\n }\n\n /**\n * Takes the specified parameters and renders a report in the pdfjs viewer\n * @param {string} parms\n **/\n var renderReport = function (parms) {\n var dataParams = parms + \"&export=False\";\n\n renderReportApi(dataParams).then(function (report) {\n if (report) {\n var url = \"static/pdfjs/web/viewer.html?file=\";\n\n var blob = createBlob(report);\n var file = URL.createObjectURL(blob);\n url = url + encodeURIComponent(file);\n\n $(\"#Main\").attr(\"src\", url);\n }\n });\n };\n\n /**\n * Takes the specified parameters and report format and\n * generates a report that is downloaded\n * @param {string} parms\n * @param {string} format\n **/\n var exportReport = function (parms, format) {\n var dataParams = parms + \"&export=True&exportFormat=\" + format;\n\n renderReportApi(dataParams).then(function (report) {\n if (report) {\n var blob = createBlob(report);\n var isIE = false || !!document.documentMode;\n if (isIE) { // support for ie11\n window.navigator.msSaveBlob(blob, report.Filename);\n } else {\n var file = URL.createObjectURL(blob);\n var filename = report.Filename;\n download(file, filename);\n\n // Releases the resource after the file is downloaded\n URL.revokeObjectURL(file);\n }\n }\n });\n };\n\n return {\n renderReport: renderReport,\n exportReport: exportReport\n };\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n Profile SERVICE\r\n\r\n Contains the core profile related code\r\n\r\n ============================================================================= */\r\nangular.module('services.reports', ['core.ajax']);\r\n\r\nangular.module('services.reports', []).factory('ReportServiceService', function ($q, $rootScope, ajax, apiService)\r\n{\r\n 'use strict';\r\n return {\r\n encrypt: function(data) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/EncryptString/',\r\n data: data\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\nangular.module('services.userAccounts', ['core.ajax']);\r\n\r\nangular.module('services.userAccounts', []).service('userAccountService', function ($q, apiService)\r\n{\r\n 'use strict';\r\n function execute(apiSvcSettings, deferred)\r\n {\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n }\r\n\r\n function executeAndNotify(apiSvcSettings, deferred)\r\n {\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n }\r\n\r\n return {\r\n loadContactContext: function (customerContactKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetContactContext/',\r\n data: {\r\n CustomerContactKey: customerContactKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n execute(apiSvcSettings, deferred);\r\n return deferred.promise;\r\n },\r\n listContacts: function (customer)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/ListCustomerContacts/',\r\n data: {\r\n CustomerKey: customer\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n execute(apiSvcSettings, deferred);\r\n return deferred.promise;\r\n },\r\n getBlankContact: function ()\r\n {\r\n var contact = {\r\n Active: -1,\r\n AltEmailAddress: \"\",\r\n AltExt: \"\",\r\n AltExt2: \"\",\r\n AltPhone: \"\",\r\n AltPhone2: \"\",\r\n AltPhone2Formatted: \"\",\r\n AltPhone2Type: -1,\r\n AltPhoneFormatted: \"\",\r\n AltPhoneType: -1,\r\n AltSpdDial: \"\",\r\n AltSpdDial2: \"\",\r\n CnSalKey: null,\r\n CPPrcNtcAllProducts: 0,\r\n CPPrcNtcChgByDateTime: null,\r\n CPPrcNtcChgByUser: null,\r\n CPPrcNtcSignupDateTime: null,\r\n CPPrcNtcSignupUser: null,\r\n CreatedBy: \"\",\r\n CustKey: 0,\r\n EmailAddress: \"\",\r\n EmailAddressOrig: \"\",\r\n Ext: \"\",\r\n FAX: \"\",\r\n FAXExt: \"\",\r\n FAXFormatted: \"\",\r\n FAXSpdDial: \"\",\r\n FaxPrefix: \"\",\r\n FirstName: \"\",\r\n Greeting: \"\",\r\n Key: -1,\r\n LastChgBy: \"\",\r\n LastName: \"\",\r\n Notes: \"\",\r\n Phone: \"\",\r\n PhoneFormatted: \"\",\r\n PhoneType: -1,\r\n ReceiveMarketingLetters: false,\r\n SpdDial: \"\",\r\n TextAddressPhone: -1,\r\n TextAddressTextMsgDomKey: -1,\r\n Title: \"\",\r\n WebActive: false,\r\n AllWebFunctions: false,\r\n WebMustChgPwd: -1,\r\n WebPWAccessSingleSite: 0,\r\n WebPWAccessSiteKey: null,\r\n WebPwd: \"\",\r\n WebQuestionAnswer: \"\",\r\n WebQuestionType: -1,\r\n Timestamp: \"\",\r\n EditorName: null,\r\n EditorEmailAddress: null,\r\n ApplyToAll: false,\r\n CustomerContactWebFunctions: [],\r\n CustomerContactWebAlerts: [],\r\n ConfirmEmail: \"\"\r\n };\r\n return contact;\r\n },\r\n saveContact: function (customerContact)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveContact/',\r\n data: {\r\n CustomerContact: customerContact\r\n }\r\n }\r\n );\r\n executeAndNotify(apiSvcSettings, deferred);\r\n return deferred.promise;\r\n },\r\n unsubscribeContact: function (contKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/UnsubscribeContact/',\r\n data: {\r\n ContactKey: contKey\r\n }\r\n }\r\n );\r\n execute(apiSvcSettings, deferred);\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\nangular.module('services.warehousePriceNotices', ['core.ajax']);\r\n\r\nangular.module('services.warehousePriceNotices',[]).service('warehousePriceNoticesService', function($q, apiService) {\r\n 'use strict';\r\n return {\r\n loadWarehousePrices: function(custKey, startDate, endDate) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetWarehousePriceNotices/',\r\n data: {\r\n CustKey:custKey,\r\n StartDate:startDate,\r\n EndDate:endDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});"]}