PageSourceSearch

https://hexisplus.com/app/controllers/paymentLogCtrl.js?ver=1.1

js hexisplus.com collected 2026-10-06 08:49:37 UTC 5,486 bytes, 144 lines download raw bytes

1angular.module("training")
2    .controller("paymentLogCtrl", function ($rootScope, $scope, $location, $http, $state, $timeout, uploadFactory, FileStorageUploader, Session, EventService, FileFolderFactory, $q) {
3
4        var user_id = Session.getData().userid;
5        if (Session.getData() == undefined || Session.getData().userid == undefined) {
6            $location.path('/');
7            return false;
8        }
9
10        $scope.showLoader = true;
11        $scope.bookings = [];
12        $scope.events = [];
13        $scope.files = [];
14        $scope.adverts = [];
15        // $scope.programmes = [];
16        $scope.bookingsById = [];
17        $scope.eventsById = [];
18        $scope.filesById = [];
19        $scope.advertsById = [];
20        // $scope.programmesById = [];
21        $scope.bookingSales = 0;
22        $scope.eventSales = 0;
23        $scope.fileSales = 0;
24        $scope.advertSales = 0;
25
26        $scope.getBookings = function() {
27            $scope.showLoader = true;
28            $http.post(base_url + 'administrator/payment_log/get_paid_bookings/' + user_id).success(function (data) {
29                $scope.bookings = data;
30                var sales = 0;
31                for(var i = 0; i < data.length; i++) {
32                    var sales = parseFloat(data[i]['total_sales']);
33                    $scope.bookingSales += sales;
34                }
35                $scope.bookingsById = [];
36                $scope.showLoader = false;
37            }).error(function (data) {
38
39            });
40        };
41        $scope.getBookingsByID = function(bookingId) {
42            $http.post(base_url + 'administrator/payment_log/get_paid_bookings_by_id/' + bookingId).success(function (data) {
43                $scope.bookingsById = data;
44            }).error(function (data) {
45
46            });
47        };
48
49        $scope.getEvents = function() {
50            $scope.showLoader = true;
51            $http.post(base_url + 'administrator/payment_log/get_paid_events/' + user_id).success(function (data) {
52                $scope.events = data;
53                var sales = 0;
54                for(var i = 0; i < data.length; i++) {
55                    var sales = parseFloat(data[i]['total_sales']);
56                    $scope.eventSales += sales;
57                }
58                $scope.eventsById = [];
59                $scope.showLoader = false;
60            }).error(function (data) {
61
62            });
63        };
64        $scope.getEventsByID = function(eventId) {
65            $http.post(base_url + 'administrator/payment_log/get_paid_events_by_id/' + eventId).success(function (data) {
66                $scope.eventsById = data;
67            }).error(function (data) {
68
69            });
70        };
71
72        $scope.getFiles = function() {
73            $scope.showLoader = true;
74            $http.post(base_url + 'administrator/payment_log/get_paid_files/' + user_id).success(function (data) {
75                $scope.files = data;
76                var sales = 0;
77                for(var i = 0; i < data.length; i++) {
78                    var sales = parseFloat(data[i]['total_sales']);
79                    $scope.fileSales += sales;
80                }
81                $scope.filesById = [];
82                $scope.showLoader = false;
83            }).error(function (data) {
84
85            });
86        }
87        $scope.getFilesByID = function(fileId) {
88            $http.post(base_url + 'administrator/payment_log/get_paid_files_by_id/' + fileId).success(function (data) {
89                $scope.filesById = data;
90            }).error(function (data) {
91
92            });
93        };
94
95        $scope.getAdverts = function() {
96            $scope.showLoader = true;
97            $http.post(base_url + 'administrator/payment_log/get_paid_adverts/' + user_id).success(function (data) {
98                $scope.adverts = data;
99                var sales = 0;
100                for(var i = 0; i < data.length; i++) {
101                    var sales = parseFloat(data[i]['total_sales']);
102                    $scope.advertSales += sales;
103                }
104                $scope.advertsById = [];
105                $scope.showLoader = false;
106            }).error(function (data) {
107
108            });
109        }
110        $scope.getAdvertsByID = function(advertId) {
111            $http.post(base_url + 'administrator/payment_log/get_paid_adverts_by_id/' + advertId).success(function (data) {
112                $scope.advertsById = data;
113            }).error(function (data) {
114
115            });
116        };
117
118        $scope.getTotalAmount = function(payments) {
119            var total = 0;
120            for(var i = 0; i < payments.length; i++) {
121                var price = parseFloat(payments[i]['amount']);
122                total += price;
123            }
124            return total;
125        }
126
127        // $scope.getProgrammes = function() {
128        //     $scope.showLoader = true;
129        //     $http.post(base_url + 'administrator/payment_log/get_paid_programmes/' + user_id).success(function (data) {
130        //         $scope.programmes = data;
131        //         $scope.programmesById = [];
132        //         $scope.showLoader = false;
133        //     }).error(function (data) {
134
135        //     });
136        // }
137        // $scope.getProgrammesByID = function(programmeId) {
138        //     $http.post(base_url + 'administrator/payment_log/get_paid_programmes_by_id/' + programmeId).success(function (data) {
139        //         $scope.programmesById = data;
140        //     }).error(function (data) {
141
142        //     });
143        // };
144    });

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.