Lets say I have a product A.
CASE A
This product is manufactured internally. Lets say I manufactured 10 units. How do I add that to stock? Per documentation what I got looks like I have to select the product and go to "Stock" tab, and use the option "Correct Stock". Is this the right way to add stocks of products which are manufactured internally?
CASE B
Lets say I buy Product from another company and stock and resell. How do I add stock in this case?
For manufacturing there is a manufacturing module that solves the problem
https://www.dolistore.com/en/products-services-or-stock/386-Factory--computer-assisted-manufacturing--CAPM-CAMM--for-Dolibarr.html
If you do not want to use it, you can create a module that performs this process, but Dolibarr does not have this feature in its core yet.
Greetings
Related
recently I started to a do some research in standardising products data.
Supermarkets often sell the same products at different prices, and it is useful to compare these prices. To do this, we need to know we are matching the same products from each supermarket. The problem is, supermarkets will often have small differences in how they name their products and list them on their websites. We need a tool that can standardise product names, recognising two differently-named products as the same product, while successfully recognising different but similarly-named products as well as differences in quantity. For example, I want to buy rasher, and when you go to search the rasher , we are going to code all rashers even though differently-named and map to HS-codes , I want to know what technologies behind this process?
Additionally, we need these products prices converted to standard units and the products to be aligned with groups defined by the World trade HS-codes. lets say price of rasher is 2.99 euro per 180g, but now I want to change it to 16.62 euro per kg with some technologies, An examination of the appropriate Natural language techniques to determine which method best fulfils these goals.
It depends on the type of difference in titles, but for now I will explain two different types :
1- If name of product is separated from pre and post words, then you can "index" product titles with tools like "Apache lucene" and just search for product name and you will get all products with that title.
2- If name of product has came with postfixes and prefixes then you can use "Edit distance algorithms" to find similar products.
For second part of you question, you should define all patterns to catch differences in weight, value, etc. and then unify them.
I want to set up a fact table for restaurant sales transactions. Adding up the entire fact table will give the entire sales across the restaurant(s). The restaurant has two main sources of revenue - food and beverage. The dimensions for each are very different.
For example, for food, I might want to track whether it's dairy free, gluten free, etc. Or I might want to see whether the dish is Italian, French, etc. For wine, I might be interested in the vintage, where the wine is from, what grape the wine is.
How do I accomplish this with one fact table? Should I simply have a Wine dimension that is NULL if the item is a food, and a Food dimension that is NULL if the item is a wine?
Your fact probably looks something like this?
SALES_LINE_ITEM_FACT
TRAN_DATE
TRAN_HOUR (or other time buckets if needed)
SERVER_KEY
TABLE_KEY
SEAT_KEY
PROMOTION_KEY
PRODUCT_KEY
REGULAR_PRICE
NET_SALE_PRICE
PRODUCT_COST
Your "product" dimension is where you need to focus your attention on, if you want to report from a sales fact how many people ordered a specific wine.
To start, it might just look something like:
PRODUCT_DIM
PRODUCT_KEY
PRODUCT_NAME
PRODUCT_CATEGORY (food / beverage)
PRODUCT_SUBCATEGORY (wine / beer / dairy / french / italian etc)
CURRENT_AVERAGE_PRODUCT_COST
You could either add the detail information as another level on the category hierarchy, or if you want to do more detailed analysis, create specific snowflakes for certain product types and connect them to the product dim.
In ioS 5, arc
The scenario that I've to implement in core data is that a product can be connected to several promotions, e.g. simple, multi buy etc. the type of the promotion determines the field values that are persisted eg. simple promotion needs to store the quantity, promoted price and the multi buy needs to store a description that says buy 2 at $6 but get 1 for $4 for eg. I need to persist these in core data.. what is the best design pattern to model these?
Thanks in advance for your help on this.
Figure out what data you need to describe a promotion. For example, you might need: 1) description, 2) discount, 3) start date, 4) end date. Create a Promotion entity that stores all that stuff.
Create a relationship between your Promotion entity and your Product entity. You'll probably want a many-to-many relationship here, since a given promo can apply to several products, and a given product can have multiple promotions.
There is no step 3.
Hopefully we have good rails developer who can definitely give correct answer! For 2 days I didn't receive any valid answer for my question
I will explain in a very simple example
Customer is offering product. When he pushes create it gives form. Choose a category. Once he chooses another form will pop up.
Depending on a category, form should have totally different attributes.I can't have Product.new for every category. Reason is they have different attributes(Logicaly true). So do I have to create 100 models for 100 categories
Categories are : cars, apartments, coupons, books and many more
If you can give just one example I will be gratefull and call you expert
Thanks
It sounds like you're getting there. However, I wouldn't have a bunch of models like you're indicating in your question. I would say that you need a Product model and a Category model. The Category model will belong_to Product. The Product model would have many Categories. The Category model can use the acts_as_tree gem so that you can have categories and subcategories. Use javascript or jQuery (there was a recent Railscasts on this) to dynamically change and post a different field with a set of choices based on what was chosen.
EDIT:
I would have three Models; Product, Category, Specification
Product has many Categories
Product has many Specifications through Categories
Category belongs to Product
Category has many Specifications
Specification belongs to Category
This way I can create a product that has several categories. I can create several categories that have several specifications. Specifications are linked to the respective category. This will allow you to have three models and limited number of classes. Once your project is complete, new categories and specifications can be maintained by a web admin instead of a programmer.
This isn't the answer you want, but you're going to need a lot of models.
The attributes associated with an apartment (square meters, utilities, floor of building) are completely different from the attributes associated with a car (make, model, mileage, condition) which are completely different from a book (title, author, publisher, edition, etc). These items are so fundamentally different that there is no way to manage them in a single model.
That being said, there may be a core collection of attributes that might be associated with a product that is for sale (seller, price, terms). You have basically two paths forward:
You could decide to use Single Table Inheritance. In this case, you'd create an abstract class that defines the attributes that are common to all products that you are selling (seller, price, item). You'd then add a "type" column to your database that would be used to determine what type of product it is (mapped to your categories), and define all of the possible attributes in a single table.
You could choose a core set of attributes, and use these as a part of any other object that is considered a product. You'd have multiple tables that would have the full record for any given object.
Without knowing a lot of details about your application, it's hard to make a specific recommendation about which approach is right for you. Your best bet at this point is to spend a lot of time on google with "single table inheritance rails" and "multi table inheritance rails" and figure out which one is right for you (though my gut says multi table).
The requirement is part of a support system. For each ticket the support system user needs to be able to select one or more companies and from those companies select one or more employees.
The schema is so far setup as company has_many users and tickets are linked to users (regardless of company) by an intermediate table with simple ticket_id and user_id fields.
Previously a large multiselect was used but even with the company name added to the text and the collection ordered by company_name and forename the list quickly became extremely long and one false click and the selection would be reset.
I guess what I am looking for is a way to list companies, as the company is selected it will populate a list of users for that company with an add/remove to add or remove them from the list of users assigned to that ticket.
I am thinking :
Company dropdown -> [populates] -> user list -> [Add|Remove buttons] -> List of users saved in database.
Thanks in advance for any ideas.
Dave
Sure, although how you actually implement it could vary wildly.
If I were doing it my first try would use an autocompleter for the company name. Once I've selected the company, that company is added to a list of selected companies (not necessarily a select, although it might be represented by one internally, but the display would likely be something more attractive). Selected the company also enables, and sets a variable with the company ID for an employee autocompleter.
The display of the selected companies and employees would likely have a "remove" button (or just an "x" icon, like a tag) as well to make removal trivial.
Off the top of my head I can't think of a more intuitive way to implement this, but I'm sure there are other ideas.