New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task # 559 : price by quantity #457
Conversation
Ok I hope I've done everything right now. Tell me if you see something wrong. |
Also fixed a bug on multiprices. When selecting a product having multiprices, the price retrieved was the price in product table, not product_price (var $pricelevel instead of $price_level) |
…tiplicate this price by qty to have the right global price in the product list
Unlike in the supplier part, I consider here that on the product page, the price defined regarding a quantity is the unit price. Tell me if you think it's better to define global price instead of unit price. |
On supplier prices, you set a quantity and a price for the quantity. Unit price is then calculated and also stored. |
…ko559 Conflicts: htdocs/core/class/html.form.class.php htdocs/install/mysql/migration/3.2.0-3.3.0.sql
Pricelists can now be defined on a product, works with single and multiprice, product selection works like in purchase module, price and discount is available by quantity |
…ko559 Conflicts: htdocs/install/mysql/migration/3.2.0-3.3.0.sql
Oops, automatic merge is no more possible. Can you push a merged version. |
…ko559 Conflicts: htdocs/install/mysql/migration/3.2.0-3.3.0.sql
Ok, I merged it, just migration mysql file with conflict. And replaced the global var. |
Sorry, but we experienced serious problem with git. A lot of commits were lost. I think i have restored everything, but i have to ask you again to make another merge. |
…ko559 Conflicts: htdocs/install/mysql/migration/3.2.0-3.3.0.sql
Ok I merged and corrected another conflict in dsl migration file. Should be ok here. |
Whoa ! Faster than light ! |
par contre je viens de voir que tu as ajouté des champs dans deux tables de Dolibarr, as-tu répercuté ces ajouts dans le fichier de migration sql ? Merci |
Oui. En fait une des deux table est une nouvelle et le create est bien dans le script de migration. Ainsi que le alter sur l'autre table (-- [ task #559 ] Price by quantity management) |
Yes, le 1er commit est bien dans le fichier de migration. Le 2ème c'est justement une correction car j'avais mis le alter dans le fichier de migration mais pas ajouté la colonne dans le fichier de la table. |
ok je n'avais pas vu :-) |
I started to integrate the developement given in the french forum (http://www.dolibarr.fr/forum/11-suggestionsnouvelles-fonctionnalites/28889-prix-client-selon-la-quantite?limit=15&start=15). Functionality is activated by setting the constant PRODUIT_PRICE_BY_QTY to 1. It allows to define prices by quantity range on custmer prices. For the moment, it only deals with price storage. Use of these prices will be added later on every documents.
Works with single price and multi price.
Comments are welcome :)