dolibarr-tasktrack
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-tasktrack] [Task #645] Remove field fk_product_fournisseur_pri


From: Doliforge
Subject: [Dolibarr-tasktrack] [Task #645] Remove field fk_product_fournisseur_price from all "->addline" and "->updateline" method. Remove fields from details tables.
Date: Thu, 29 Aug 2013 21:22:51 +0200

Doliforge
Is this email not displaying correctly?
update email preferences.

Remove field fk_product_fournisseur_price from all "->addline" and "->updateline" method. Remove fields from details tables.

Latest modifications

2013-08-29 21:22 (Europe/Paris)
Changes:
  • Priority: 
9 - Highest7
  • Subproject: 
NoneModule Suppliers

Answer now

Snapshot

 Details
Submitted on:  2012-12-19 15:57 Submitted by:  Laurent Destailleur (eldy)
Last Modified On:  2013-08-29 21:21 
Summary:  Remove field fk_product_fournisseur_price from all "->addline" and "->updateline" method. Remove fields from details tables.
Description:  Remove field fk_product_fournisseur_price from all addline method and details tables.
This field is useless, because the pa_ht is used instead for margin calculation.
Priority:  7 Open to Any Developer:  No
Subproject:  Module Suppliers Assigned to (multiple):  None
 Status
Start Date:  - End Date:  -
Completion (0-100%):  0 Status:  Open

Comments

Laurent Destailleur 2013-08-29 21:21
Hum, i see.
The goal of the field was not dedicated to provide such feature but another one and for this one usage was not a good thing.
For your need, i am afraid there is no feature for that, but i understand the need. I think what you need is that we store supplier id. I think it's a better thing than storing a field of a "link" table that can change.
If i change this into a feature request "add supplier id" into invoice line when we use margin module, is it ok for you ?
Andriolo Hubert 2013-08-29 18:27
I just add another comment on this :
I have many orders not invoiced, all invoices are delivered orders, I don't base my statistics on orders, but on invoices.
When fk_product_fournisseur_price disappeared, it became a nightmare for me to track (in phpmyadmin)
what i have bought to which supplier, at which price, and when...

If my customer, for example wants to know where I have bought the product and when (let's say my product is disinfectant and smells strangely... he has a problem!)...
fk_product-fourn_price would let me know to which supplier I bought it...
And sorting by dates of supplier (and stock left) I could know at whih period,
and find the delivery receipt of my supplier to tell him what is the "lot number" of the product
and alert authorities about the problem on this "lot"

Now the it disappeared is there another way to trace-ability ?

Hope you can answser and see my comment.
Christophe Battarel 2013-06-06 19:47
just remember that since we don't have any margin field (amount or rate) anywhere in the database, the margin is calculated from the pa_ht stored in the facturedet table, so it is not useless at all.
Laurent Destailleur 2013-06-06 18:53
I agree with you. What i would like to say is that field is useless once invoice is done.

If we speak about order, proposal, this field is required to be used later to get current supplier price (or not) when building invoice.
For invoice, field should be useless. However to have same fields between elements (orders, invoices, proposal...), we may keep the field also for invoices. So i close task (i have just added comment onto fields of sql files)
Laurent Destailleur 2013-06-06 18:53
I agree with you. What i would like to say is that field is useless once invoice is done.

If we speak about order, proposal, this field is required to be used later to get current supplier price (or not) when building invoice.
For invoice, field should be useless. However to have same fields between elements (orders, invoices, proposal...), we may keep the field also for invoices. So i close task (i have just added comment onto fields of sql files)
Christophe Battarel 2013-06-06 14:21
i persist to think that margin calculation must be made at invoice time, so the buying price must be the one at invoice time.
if a customer orders a 10 euros product that costs me 5 euros at this time, but when i do the invoice it costs 6 euros, the margin is 10 - 6, and not 10 - 5.
other solution, we should maybe use an average price (PMP in french) but it can only be done with stocked products.
Laurent Destailleur 2013-06-05 22:34
Price used when order is defined must be saved into pa_ht.
So price can change after, it is not a problem since value used was saved during order creation. There is no reason to have a link to a table that is a view at t time, so a value useless for calculation since what we need is value when element was created.
address@hidden 2012-12-19 22:34
This field is used in case supplier price change between order and invoice
Laurent Destailleur 2012-12-19 17:42
Remove field fk_product_fournisseur_price from all "->addline" and "->updateline" method.
Remove fields from details tables.
Remove also field label that are duplicate fields and create conflicts.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]