PageSourceSearch

https://app.menucontrol.com.br/scripts/controllers/receipt_additional_costs_controller.js

js menucontrol.com.br collected 2026-10-05 23:46:53 UTC 1,551 bytes, 64 lines download raw bytes

1// new_modal_form "action"
2app
3  .controller("receipt_additional_costs_new_modal_form", function(
4    $scope,
5    ReceiptAdditionalCostsPathTo,
6    $modalInstance,
7    additional_cost_types,
8    receipt_id
9  ) {
10    $scope.additional_cost_types = additional_cost_types
11    $scope.additional_cost = {
12      name: "",
13      cost_type: "",
14      value: "",
15      receipt_id: receipt_id
16    }
17
18    $scope.formSubmit = function() {
19      $scope.busy = true
20      ReceiptAdditionalCostsPathTo.save(
21        $scope.additional_cost,
22        function success(receipt) {
23          $scope.busy = false
24          $modalInstance.close(receipt)
25        },
26        function error(error) {
27          $scope.busy = false
28        }
29      )
30    }
31
32    $scope.cancel = function() {
33      $modalInstance.dismiss("cancel")
34    }
35  })
36
37  // edit_modal_form "action"
38  .controller("receipt_additional_costs_edit_modal_form", function(
39    $scope,
40    ReceiptAdditionalCostsPathTo,
41    $modalInstance,
42    additional_cost_types,
43    additional_cost
44  ) {
45    $scope.additional_cost_types = additional_cost_types
46    $scope.additional_cost = additional_cost
47
48    $scope.formSubmit = function() {
49      ReceiptAdditionalCostsPathTo.update(
50        {
51          id: $scope.additional_cost.id,
52          receipt_additional_cost: $scope.additional_cost
53        },
54        function success(receipt) {
55          $modalInstance.close(receipt)
56        },
57        function error(error) {}
58      )
59    }
60
61    $scope.cancel = function() {
62      $modalInstance.dismiss("cancel")
63    }
64  })

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.