61
edits
m (Fixing some paragraphs formatting issues.) |
(→Informations: Update of meta-data after 6 years!) |
||
| Line 3: | Line 3: | ||
{{TemplateDocDevEn}} | {{TemplateDocDevEn}} | ||
{{TemplateDocUser}} | {{TemplateDocUser}} | ||
= Informations = | =Informations= | ||
{{TemplateModuleInfo | {{TemplateModuleInfo | ||
|modulename=Purchases | |modulename=Purchases | ||
|editor= | |editor=IMASDEWEB | ||
|webbuy=[https://www.dolistore.com/en | |webbuy=[https://www.dolistore.com/product.php?id=1571&title=purchases&l=en Dolistore] | ||
|status=stable | |status=stable | ||
|version=1.4 | |version=1.4 | ||
|minversion= | |minversion=15.x | ||
|maxversion= | |maxversion=21.x | ||
|note=Last version 1 | |note=Last version 21.0.1 | ||
}} | }} | ||
= Features = | =Features= | ||
Interface translated to these languages: <strong>English / French / Catalan / Castillian (spanish) / Polish</strong> | Interface translated to these languages: <strong>English / French / Catalan / Castillian (spanish) / Polish</strong> | ||
| Line 21: | Line 21: | ||
This Purchases module has been developed as an assistant that allows us to quickly and easily make the purchase of X products: | This Purchases module has been developed as an assistant that allows us to quickly and easily make the purchase of X products: | ||
* Being able to '''compare prices from several suppliers''', even in '''different currencies'''. | *Being able to '''compare prices from several suppliers''', even in '''different currencies'''. | ||
* Being able to send by mail with a single click '''invitations to our selected suppliers''' to visit a link with which they access a simple '''multi-language form''' in which they can capture the prices for us, decline or confirm the sale of any of the requested products, and add some extra comment about delivery and/or payment conditions. | *Being able to send by mail with a single click '''invitations to our selected suppliers''' to visit a link with which they access a simple '''multi-language form''' in which they can capture the prices for us, decline or confirm the sale of any of the requested products, and add some extra comment about delivery and/or payment conditions. | ||
* Being able to '''modify / add / remove prices''' from any supplier to any product from that same price table, with just two clicks. | *Being able to '''modify / add / remove prices''' from any supplier to any product from that same price table, with just two clicks. | ||
* Being able to create the corresponding '''orders also with two clicks''', filling automatically with all the information of each supplier and the products. | *Being able to create the corresponding '''orders also with two clicks''', filling automatically with all the information of each supplier and the products. | ||
In short, an interface easier and more agile to use, that allows you to do the same thing that you can already do with the native Dolibarr interface but in a much more comfortable way. Well, in Dolibarr it would be very difficult to compare the prices of each product for each supplier and then assemble the different orders. And obviously there is no way to suppliers capture the prices you need. | In short, an interface easier and more agile to use, that allows you to do the same thing that you can already do with the native Dolibarr interface but in a much more comfortable way. Well, in Dolibarr it would be very difficult to compare the prices of each product for each supplier and then assemble the different orders. And obviously there is no way to suppliers capture the prices you need. | ||
| Line 30: | Line 30: | ||
'''Note: '''given that Dolibarr has an incomplete treatment and in some points incongrant handling different currencies (EUR, USD, MXN, MAD, etc ...) for the prices of the products, there has been no choice but to implement a small '''patching of Dolibarr''' . At the end of this guide we explain how to do it (it is a simple copy and paste of no more than 20 lines of code in a single PHP file on Dolibarr core). But it is necessary that before you continue reading you know that if you want this '''Purchases module''' to work well in a multi-currency environment you will have to do that patching of Dolibarr. | '''Note: '''given that Dolibarr has an incomplete treatment and in some points incongrant handling different currencies (EUR, USD, MXN, MAD, etc ...) for the prices of the products, there has been no choice but to implement a small '''patching of Dolibarr''' . At the end of this guide we explain how to do it (it is a simple copy and paste of no more than 20 lines of code in a single PHP file on Dolibarr core). But it is necessary that before you continue reading you know that if you want this '''Purchases module''' to work well in a multi-currency environment you will have to do that patching of Dolibarr. | ||
= Install = | =Install= | ||
To install a module in Dolibar is as simple as: | To install a module in Dolibar is as simple as: | ||
* Download the archive file of module (.zip file) from web site [https://www.dolistore.com/en/modules/865-Purchases.html DoliStore.com] | *Download the archive file of module (.zip file) from web site [https://www.dolistore.com/en/modules/865-Purchases.html DoliStore.com] | ||
* Create the directory: '''/htdocs/purchases''' into the root of Dolibarr. | *Create the directory: '''/htdocs/purchases''' into the root of Dolibarr. | ||
* Put the content of the ZIP file into that directory | *Put the content of the ZIP file into that directory | ||
* On your Dolibarr panel enable the module: '''Setup -> Modules''' | *On your Dolibarr panel enable the module: '''Setup -> Modules''' | ||
Once you have done it, it will appear in the configuration of the modules, in the Dolibarr panel. In the case of this module, you will see it in the <u>Supplier Relationship Management (SRM)</u> group, with the name <u>Purchases</u>. | Once you have done it, it will appear in the configuration of the modules, in the Dolibarr panel. In the case of this module, you will see it in the <u>Supplier Relationship Management (SRM)</u> group, with the name <u>Purchases</u>. | ||
| Line 45: | Line 45: | ||
</div> | </div> | ||
= Usage = | =Usage= | ||
== Accessing the module == | ==Accessing the module== | ||
Once activated, we will reach it in two possible ways: | Once activated, we will reach it in two possible ways: | ||
* Visiting the <u>Commercial</u> section, and then in the left side menu we will see the two options for this module: <u>New purchase</u> / <u>List</u> | *Visiting the <u>Commercial</u> section, and then in the left side menu we will see the two options for this module: <u>New purchase</u> / <u>List</u> | ||
<div class="center"> | <div class="center"> | ||
[[File:DoliPurchasesLeftMenu.png|border]] | [[File:DoliPurchasesLeftMenu.png|border]] | ||
</div> | </div> | ||
* Or, from the <u>Dashboard</u>, where we will have a box with the <u>Last 5 purchases</u>. | *Or, from the <u>Dashboard</u>, where we will have a box with the <u>Last 5 purchases</u>. | ||
<div class="center"> | <div class="center"> | ||
[[File:DoliPurchasesBoxLatestPurchases.png|border]] | [[File:DoliPurchasesBoxLatestPurchases.png|border]] | ||
| Line 62: | Line 62: | ||
== Purchase list == | ==Purchase list== | ||
There is not much to say about the list of purchase processes. The most interesting thing is to explain the possible values for the <u>Status</u> column: | There is not much to say about the list of purchase processes. The most interesting thing is to explain the possible values for the <u>Status</u> column: | ||
* <strong>Draft</strong>: when we only have a list of products to buy | *<strong>Draft</strong>: when we only have a list of products to buy | ||
* <strong>Quoting</strong>: when we have prices of one or more suppliers for some of the products to buy | *<strong>Quoting</strong>: when we have prices of one or more suppliers for some of the products to buy | ||
* <strong>Buying</strong>: when at least one price has already been selected for some of the products and the corresponding purchase order has been created | *<strong>Buying</strong>: when at least one price has already been selected for some of the products and the corresponding purchase order has been created | ||
* <strong>Completed</strong>: when purchase orders have already been created for all products | *<strong>Completed</strong>: when purchase orders have already been created for all products | ||
| Line 76: | Line 76: | ||
</div> | </div> | ||
== Editing a purchase == | ==Editing a purchase== | ||
The card of a not-completed purchase would look like the one shown below (click to open in another tab of the browser and see the detail): | The card of a not-completed purchase would look like the one shown below (click to open in another tab of the browser and see the detail): | ||
| Line 84: | Line 84: | ||
</div> | </div> | ||
* At the top of the form there is a brief form with only the minimum descriptive information, of which it is worth noting that we can <strong>link the purchase to a project</strong> that we have created in Dolibarr, if we have activated the <u>Projects module</u>. | *At the top of the form there is a brief form with only the minimum descriptive information, of which it is worth noting that we can <strong>link the purchase to a project</strong> that we have created in Dolibarr, if we have activated the <u>Projects module</u>. | ||
* Below of that short form, there is an action button bar, to change record changes in that form, to send quotation requests by mail to the selected suppliers, to create orders or to eliminate the purchase: | *Below of that short form, there is an action button bar, to change record changes in that form, to send quotation requests by mail to the selected suppliers, to create orders or to eliminate the purchase: | ||
<div class="center"> | <div class="center"> | ||
[[File:DoliPurchasesEditButtons.png|border]] | [[File:DoliPurchasesEditButtons.png|border]] | ||
</div> | </div> | ||
* Under these buttons we have the <strong>list of products</strong>: a table where each row will contain a product to buy and a <strong>table comparing prices</strong> of one or more suppliers. In the first line we have the <strong>status of this product</strong>: 1) without prices, 2) with prices but without order, 3) created an order. | *Under these buttons we have the <strong>list of products</strong>: a table where each row will contain a product to buy and a <strong>table comparing prices</strong> of one or more suppliers. In the first line we have the <strong>status of this product</strong>: 1) without prices, 2) with prices but without order, 3) created an order. | ||
<div class="divforimgcentpercent center"> | <div class="divforimgcentpercent center"> | ||
[[File:DoliPurchasesEditLine.png|border]] | [[File:DoliPurchasesEditLine.png|border]] | ||
| Line 98: | Line 98: | ||
<strong>Note:</strong> It is important to understand that we can change the values of the text boxes of this price table, that is, change the quantity of the product, the unit price or the minimum number of units that the supplier requires us to buy, and the page will automatically recalculate in real time the final price in the last column, in the currency of our company, but <strong>these changes will not be saved</strong> in the server (!!). So if we want to save the changes we have to click the button to save changes [[File:DoliPurchasesButton_Save.png]]. | <strong>Note:</strong> It is important to understand that we can change the values of the text boxes of this price table, that is, change the quantity of the product, the unit price or the minimum number of units that the supplier requires us to buy, and the page will automatically recalculate in real time the final price in the last column, in the currency of our company, but <strong>these changes will not be saved</strong> in the server (!!). So if we want to save the changes we have to click the button to save changes [[File:DoliPurchasesButton_Save.png]]. | ||
* Let's look in detail at the <strong>price comparison table</strong>: | *Let's look in detail at the <strong>price comparison table</strong>: | ||
<div class="center"> | <div class="center"> | ||
[[File:DoliPurchasesPriceComparison.png|border]] | [[File:DoliPurchasesPriceComparison.png|border]] | ||
</div> | </div> | ||
** <strong>Colors</strong>: the text boxes will appear <u>green</u> if the supplier in question responded to the quote request (below we will see how to make that request) and confirmed having that product in stock. Instead, they will appear in <u>orange</u> if the request was already sent to that provider but the provider has not yet responded. Finally, it will appear in <u>red</u> when the supplier has responded and indicated that this product can not be supplied. In the latter case, the circular control for <u>Create Order</u> (last column of the price table) will be disabled and an icon will appear in its place that will show the comment left by the supplier. | **<strong>Colors</strong>: the text boxes will appear <u>green</u> if the supplier in question responded to the quote request (below we will see how to make that request) and confirmed having that product in stock. Instead, they will appear in <u>orange</u> if the request was already sent to that provider but the provider has not yet responded. Finally, it will appear in <u>red</u> when the supplier has responded and indicated that this product can not be supplied. In the latter case, the circular control for <u>Create Order</u> (last column of the price table) will be disabled and an icon will appear in its place that will show the comment left by the supplier. | ||
** <strong>Multi-currency</strong>: it is important to understand that this module takes <strong>the prices of the different suppliers in the currency of each supplier</strong>. Beware, at this moment (versions of Dolibarr previous or equal to 6.X) IT IS NOT THAT way on Dolibarr!! On Dolibarr, at this moment, the prices introduced in the system ALWAYS are in the currency that we have defined in the system for our company, not the supplier currency !!!! For that reason it is necessary and convenient that you do the <strong>patching of Dolibarr</strong> that we suggest at the end of this guide. It will simply affect how the price of a product is added to an order. | **<strong>Multi-currency</strong>: it is important to understand that this module takes <strong>the prices of the different suppliers in the currency of each supplier</strong>. Beware, at this moment (versions of Dolibarr previous or equal to 6.X) IT IS NOT THAT way on Dolibarr!! On Dolibarr, at this moment, the prices introduced in the system ALWAYS are in the currency that we have defined in the system for our company, not the supplier currency !!!! For that reason it is necessary and convenient that you do the <strong>patching of Dolibarr</strong> that we suggest at the end of this guide. It will simply affect how the price of a product is added to an order. | ||
** <strong>Calculations</strong>: having said that, with this module Purchases and the suggested Dolibarr patch we can handle "normally" supplier prices in their own currencies (first column) and at the same time be able to compare the <u>Final price</u> (penultimate column) in our own currency (MXN in my case). Keep in mind that to calculate the <u>Final Price</u> the <u>Unit Price</u> is multiplied by the <u>Minimum quantity</u> or by the number of <u>Units</u> (whichever is greater than these two values). For example, in the case of the second supplier of the image (the orange one) we are required to buy a minimum of 5 units, so we multiply the unit price by 5 to obtain the final price. While for the other suppliers we multiply by 4, which is the number of units we need. | **<strong>Calculations</strong>: having said that, with this module Purchases and the suggested Dolibarr patch we can handle "normally" supplier prices in their own currencies (first column) and at the same time be able to compare the <u>Final price</u> (penultimate column) in our own currency (MXN in my case). Keep in mind that to calculate the <u>Final Price</u> the <u>Unit Price</u> is multiplied by the <u>Minimum quantity</u> or by the number of <u>Units</u> (whichever is greater than these two values). For example, in the case of the second supplier of the image (the orange one) we are required to buy a minimum of 5 units, so we multiply the unit price by 5 to obtain the final price. While for the other suppliers we multiply by 4, which is the number of units we need. | ||
** <strong>Currency exchange rates</strong>: currency exchange rates (ie, how many MXN are a USD) the Purchases module takes them <strong>in real time</strong> from the <u>International Monetary Fund</u> website (www.imf.org/external/np/fin/data/rms_rep.aspx). In fact, because we don't want to call too many times to that external website and not to slow down the loading of this quotation page, a query of the IMF page is made <strong>only every 12 hours</strong>. In short, we can be quite sure that the calculation between currencies is sufficiently adjusted to reality, and works completely automatically and in the background. By the way, you should also know that once we place an order for a product, the Purchases module registers the currency changes at that moment, and in the future, when you go back to consult the card of this purchase, it will show you the table comparison of prices according to currency exchange rates at the time of placing the order. As long as there is not a created order, the exchange rates will be updated, so today you can see a price of $11USD in Mexican pesos different from the one you saw yesterday in the same table, obviously because every day the currency exchange rates fluctuate. | **<strong>Currency exchange rates</strong>: currency exchange rates (ie, how many MXN are a USD) the Purchases module takes them <strong>in real time</strong> from the <u>International Monetary Fund</u> website (www.imf.org/external/np/fin/data/rms_rep.aspx). In fact, because we don't want to call too many times to that external website and not to slow down the loading of this quotation page, a query of the IMF page is made <strong>only every 12 hours</strong>. In short, we can be quite sure that the calculation between currencies is sufficiently adjusted to reality, and works completely automatically and in the background. By the way, you should also know that once we place an order for a product, the Purchases module registers the currency changes at that moment, and in the future, when you go back to consult the card of this purchase, it will show you the table comparison of prices according to currency exchange rates at the time of placing the order. As long as there is not a created order, the exchange rates will be updated, so today you can see a price of $11USD in Mexican pesos different from the one you saw yesterday in the same table, obviously because every day the currency exchange rates fluctuate. | ||
<div class="center"> | <div class="center"> | ||
| Line 115: | Line 115: | ||
</div> | </div> | ||
** [[File:DoliPurchasesButton_Del.png]] <strong>Delete button</strong>: when clicked, it will show us a dialog box asking if we want to only remove this price from this comparison, or if <strong>we also want to eliminate the price of this supplier for this Dolibarr system product</strong>. If you are sure that the supplier is never going to sell you that product or simply has never given you a price, it is advisable that you choose the second option. | **[[File:DoliPurchasesButton_Del.png]] <strong>Delete button</strong>: when clicked, it will show us a dialog box asking if we want to only remove this price from this comparison, or if <strong>we also want to eliminate the price of this supplier for this Dolibarr system product</strong>. If you are sure that the supplier is never going to sell you that product or simply has never given you a price, it is advisable that you choose the second option. | ||
** [[File:DoliPurchasesButton_Edit.png]] <strong>Edit price button</strong>: will open in a new tab of the browser the usual Dolibarr form for editing the price of this supplier for this product. What is useful for us? Well, because there we have more editing options than in our comparison table. For example, there we can edit the VAT to apply for this product. | **[[File:DoliPurchasesButton_Edit.png]] <strong>Edit price button</strong>: will open in a new tab of the browser the usual Dolibarr form for editing the price of this supplier for this product. What is useful for us? Well, because there we have more editing options than in our comparison table. For example, there we can edit the VAT to apply for this product. | ||
** [[File:DoliPurchasesButton_Mail.png]] <strong>Email button</strong>: is a link of the type "mailto" and therefore will open our mailing program that we have configured on our machine, by filling in the recipient's box with the email address of the supplier in question. For this reason, this button does not appear when in Dolibarr we have not filled in the email field for the supplier in question. | **[[File:DoliPurchasesButton_Mail.png]] <strong>Email button</strong>: is a link of the type "mailto" and therefore will open our mailing program that we have configured on our machine, by filling in the recipient's box with the email address of the supplier in question. For this reason, this button does not appear when in Dolibarr we have not filled in the email field for the supplier in question. | ||
<div class="center"> | <div class="center"> | ||
| Line 142: | Line 142: | ||
== Request quotations to suppliers == | ==Request quotations to suppliers== | ||
The first thing to note is that this Purchases module does not use the native functionality of <u>Request for quotations from suppliers</u> that <strong>Dolibarr brings natively</strong>. It has chosen to build our own solution to avoid problems in Dolibarr related to the multi-currency. So, you will see below that the system we have built is highly functional, multi-currency and multi-language, but does not create any record in Dolibarr for supplier quotes. | The first thing to note is that this Purchases module does not use the native functionality of <u>Request for quotations from suppliers</u> that <strong>Dolibarr brings natively</strong>. It has chosen to build our own solution to avoid problems in Dolibarr related to the multi-currency. So, you will see below that the system we have built is highly functional, multi-currency and multi-language, but does not create any record in Dolibarr for supplier quotes. | ||
| Line 148: | Line 148: | ||
Having said that, we must proceed in this way: | Having said that, we must proceed in this way: | ||
* once in our purchase we have built the list of products to buy | *once in our purchase we have built the list of products to buy | ||
* the system will automatically have added the prices of the suppliers that already exist in our system for those products | *the system will automatically have added the prices of the suppliers that already exist in our system for those products | ||
* optionally, we can add more suppliers to a specific product (you can indicate as price "0" if you still do not have the price of these products) | *optionally, we can add more suppliers to a specific product (you can indicate as price "0" if you still do not have the price of these products) | ||
* then pressing the button <u>Send emails requesting quotation</u> will display a dialog box, from where with a single click on the new button <u>Send emails requesting quotation</u> these emails will be sent, at least to the suppliers for whom we have defined an email address. In the case of the picture below, only the first one. | *then pressing the button <u>Send emails requesting quotation</u> will display a dialog box, from where with a single click on the new button <u>Send emails requesting quotation</u> these emails will be sent, at least to the suppliers for whom we have defined an email address. In the case of the picture below, only the first one. | ||
<div class="divforimgcentpercent center"> | <div class="divforimgcentpercent center"> | ||
| Line 160: | Line 160: | ||
</div> | </div> | ||
* In that email that the suppliers will receive they are specified IN THEIR LANGUAGE (while the Purchases module is translated in that language) the <b>list of products</b> that we are interested to be quoted to and <b>they are invited to visit a web form</b> where they can capture the prices themselves and terms. | *In that email that the suppliers will receive they are specified IN THEIR LANGUAGE (while the Purchases module is translated in that language) the <b>list of products</b> that we are interested to be quoted to and <b>they are invited to visit a web form</b> where they can capture the prices themselves and terms. | ||
*<strong>We can visit this quotation web form</strong> by clicking on the <u>Form</u> buttons in the previous dialog box. <strong>Each form is unique for each purchase and supplier, and the parameters of the URL are encrypted</strong> to prevent them from manipulating the URL and accessing the prices of other suppliers. | |||
It is recommended that if the provider in question does not have email or send us their prices by other channels (phone, whatsapp, mail, etc ...) <strong>we should use the corresponding capture web form to enter the prices</strong> of this supplier for this purchase. In this way, we will see them marked in green (or in red, in case you do not have a product) in the price comparison table of this module. | It is recommended that if the provider in question does not have email or send us their prices by other channels (phone, whatsapp, mail, etc ...) <strong>we should use the corresponding capture web form to enter the prices</strong> of this supplier for this purchase. In this way, we will see them marked in green (or in red, in case you do not have a product) in the price comparison table of this module. | ||
* This is how the web form for capturing prices for the provider looks: | *This is how the web form for capturing prices for the provider looks: | ||
<div class="divforimgcentpercent center"> | <div class="divforimgcentpercent center"> | ||
| Line 182: | Line 183: | ||
== Patching of Dolibarr (5.X to 6.X) == | ==Patching of Dolibarr (5.X to 6.X)== | ||
This small patching of Dolibarr is necessary <strong>if in your Dolibarr you have activated the "multi-currency" module</strong>, that is, if you are going to have suppliers or clients that handle different currencies to your company: | This small patching of Dolibarr is necessary <strong>if in your Dolibarr you have activated the "multi-currency" module</strong>, that is, if you are going to have suppliers or clients that handle different currencies to your company: | ||
| Line 223: | Line 224: | ||
=Development= | |||
= Development = | |||
Module developed by [https://github.com/caos30/ Sergi Rodrigues] for '''BIMEX.tech''' on 2017. | Module developed by [https://github.com/caos30/ Sergi Rodrigues] for '''BIMEX.tech''' on 2017. | ||
edits