       lineItem.final_weight_volume = LineItems.pristineByID[lineItem.id].final_weight_volume * lineItem.quantity / LineItems.pristineByID[lineItem.id].quantity
       $scope.weightAdjustedPrice(lineItem)
 
+  $scope.resetFilters()
   $scope.refreshData()


  $scope.refreshData = ->
    unless !$scope.orderCycleFilter? || $scope.orderCycleFilter == ''
      start_date = OrderCycles.byID[$scope.orderCycleFilter].orders_open_at
      end_date = OrderCycles.byID[$scope.orderCycleFilter].orders_close_at
      format = "YYYY-MM-DD HH:mm:ss Z"
      $scope.startDate = moment(start_date, format).format('YYYY-MM-DD')
      $scope.endDate = moment(end_date, format).startOf('day').format('YYYY-MM-DD')

    formatted_start_date = moment($scope.startDate).format()
    formatted_end_date = moment($scope.endDate).add(1,'day').format()

    return unless moment(formatted_start_date).isValid() and moment(formatted_start_date).isValid()

    RequestMonitor.load $scope.orders = Orders.index(
      "q[state_not_eq]": "canceled",
      "q[completed_at_not_null]": "true",
      "q[distributor_id_eq]": $scope.distributorFilter,
      "q[order_cycle_id_eq]": $scope.orderCycleFilter,
      "q[completed_at_gteq]": formatted_start_date,
      "q[completed_at_lt]": formatted_end_date
    )

    RequestMonitor.load LineItems.index(
      "q[order_state_not_eq]": "canceled",
      "q[order_completed_at_not_null]": "true",
      "q[order_distributor_id_eq]": $scope.distributorFilter,
      "q[variant_product_supplier_id_eq]": $scope.supplierFilter,
      "q[order_order_cycle_id_eq]": $scope.orderCycleFilter,
      "q[order_completed_at_gteq]": formatted_start_date,
      "q[order_completed_at_lt]": formatted_end_date,
      page: $scope.page,
      per_page: $scope.per_page
    )

    unless $scope.initialized
      RequestMonitor.load $scope.distributors = Enterprises.index(action: "visible", ams_prefix: "basic", "q[sells_in][]": ["own", "any"])
      RequestMonitor.load $scope.orderCycles = OrderCycles.index(ams_prefix: "basic", as: "distributor", "q[orders_close_at_gt]": "#{moment().subtract(90,'days').format()}")
      RequestMonitor.load $scope.suppliers = Enterprises.index(action: "visible", ams_prefix: "basic", "q[is_primary_producer_eq]": "true")

    RequestMonitor.load $q.all([$scope.orders.$promise, $scope.distributors.$promise, $scope.orderCycles.$promise, $scope.suppliers.$promise, $scope.line_items.$promise]).then ->
      Dereferencer.dereferenceAttr $scope.orders, "distributor", Enterprises.byID
      Dereferencer.dereferenceAttr $scope.orders, "order_cycle", OrderCycles.byID

      Dereferencer.dereferenceAttr $scope.line_items, "order", Orders.byID
      $scope.bulk_order_form.$setPristine()
      StatusMessage.clear()

      unless $scope.initialized
        $scope.initialized = true

