Skip to content
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

Merged
merged 25 commits into from Dec 5, 2012
Merged

Task # 559 : price by quantity #457

merged 25 commits into from Dec 5, 2012

Conversation

atm-maxime
Copy link
Member

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 :)

@atm-maxime
Copy link
Member Author

Ok I hope I've done everything right now. Tell me if you see something wrong.

@atm-maxime
Copy link
Member Author

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
@atm-maxime
Copy link
Member Author

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.

@eldy
Copy link
Member

eldy commented Nov 3, 2012

On supplier prices, you set a quantity and a price for the quantity. Unit price is then calculated and also stored.
It should be same for customer prices.

@atm-maxime
Copy link
Member Author

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
@eldy
Copy link
Member

eldy commented Dec 1, 2012

Oops, automatic merge is no more possible. Can you push a merged version.
Also can you rename constant PRODUIT_PRICE_BY_QTY into PRODUIT_CUSTOMER_PRICES_BY_QTY

@atm-maxime
Copy link
Member Author

Ok, I merged it, just migration mysql file with conflict. And replaced the global var.

@eldy
Copy link
Member

eldy commented Dec 4, 2012

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
@atm-maxime
Copy link
Member Author

Ok I merged and corrected another conflict in dsl migration file. Should be ok here.

hregis added a commit that referenced this pull request Dec 5, 2012
Task # 559 : price by quantity
@hregis hregis merged commit 644a05f into Dolibarr:develop Dec 5, 2012
@atm-maxime
Copy link
Member Author

Whoa ! Faster than light !

@hregis
Copy link
Contributor

hregis commented Dec 5, 2012

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

@atm-maxime
Copy link
Member Author

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)

@hregis
Copy link
Contributor

hregis commented Dec 5, 2012

oui ici je suis d'accord :-)
mais des champs ont été rajoutés dans des tables déjà existantes dans dolibarr

fdc6ed9

84df6bd

@atm-maxime
Copy link
Member Author

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.

@hregis
Copy link
Contributor

hregis commented Dec 5, 2012

ok je n'avais pas vu :-)
merci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants