API v1 orders endpoints
This commit is contained in:
parent
7d5155bef6
commit
127ae83f04
9 changed files with 165 additions and 10 deletions
|
|
@ -23,6 +23,14 @@ class Supplier < ApplicationRecord
|
|||
scope :undeleted, -> { where(deleted_at: nil) }
|
||||
scope :having_articles, -> { where(id: Article.undeleted.select(:supplier_id).distinct) }
|
||||
|
||||
def self.ransackable_attributes(auth_object = nil)
|
||||
%w(id name)
|
||||
end
|
||||
|
||||
def self.ransackable_associations(auth_object = nil)
|
||||
%w(articles stock_articles orders)
|
||||
end
|
||||
|
||||
# sync all articles with the external database
|
||||
# returns an array with articles(and prices), which should be updated (to use in a form)
|
||||
# also returns an array with outlisted_articles, which should be deleted
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue