<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dolibarr.org/index.php?action=history&amp;feed=atom&amp;title=Module_Charges_PMP</id>
	<title>Module Charges PMP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dolibarr.org/index.php?action=history&amp;feed=atom&amp;title=Module_Charges_PMP"/>
	<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Charges_PMP&amp;action=history"/>
	<updated>2026-11-14T19:33:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Charges_PMP&amp;diff=69018&amp;oldid=prev</id>
		<title>Weglob: Version 3.2.1</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Charges_PMP&amp;diff=69018&amp;oldid=prev"/>
		<updated>2026-11-12T16:33:16Z</updated>

		<summary type="html">&lt;p&gt;Version 3.2.1&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:33, 12 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l26&quot;&gt;Line 26:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Status || Stable&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Status || Stable&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Version || 3.2.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Version || 3.2.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Module ID || 500050&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Module ID || 500050&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki_test:diff::1.12:old-69013:rev-69018 --&gt;
&lt;/table&gt;</summary>
		<author><name>Weglob</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Charges_PMP&amp;diff=69013&amp;oldid=prev</id>
		<title>Weglob: New page: Module Charges PMP (Weglob module documentation)</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Charges_PMP&amp;diff=69013&amp;oldid=prev"/>
		<updated>2026-11-12T16:15:55Z</updated>

		<summary type="html">&lt;p&gt;New page: Module Charges PMP (Weglob module documentation)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Module_Charges_PMP_(FR)]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModuleInfo&lt;br /&gt;
|modulename=PMPCharges&lt;br /&gt;
|editor=Weglob&lt;br /&gt;
|web=https://weglob.com&lt;br /&gt;
|webbuy=https://www.dolistore.com/product.php?id=2867&lt;br /&gt;
|status=stable&lt;br /&gt;
|prerequisites=Stock, Products and Suppliers modules enabled&lt;br /&gt;
|minversion=20.0&lt;br /&gt;
|note=Module ID 500050&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Module Charges PMP (PMPCharges) =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Publisher || Weglob&lt;br /&gt;
|-&lt;br /&gt;
| Status || Stable&lt;br /&gt;
|-&lt;br /&gt;
| Version || 3.2.0&lt;br /&gt;
|-&lt;br /&gt;
| Module ID || 500050&lt;br /&gt;
|-&lt;br /&gt;
| Dolibarr compatibility || 20.0 and later&lt;br /&gt;
|-&lt;br /&gt;
| License || GPL v3 or later&lt;br /&gt;
|-&lt;br /&gt;
| Languages || English, French&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Charges PMP&amp;#039;&amp;#039;&amp;#039; adds extra purchase costs (transport, customs, other fees) into the &amp;#039;&amp;#039;&amp;#039;weighted average price (PMP)&amp;#039;&amp;#039;&amp;#039; of products when supplier goods enter the stock.&lt;br /&gt;
&lt;br /&gt;
Without this module, Dolibarr computes the PMP from the purchase price only. With it, the landed cost is spread over the received products, so your stock value and margins reflect the real cost.&lt;br /&gt;
&lt;br /&gt;
The module stays aligned with the native Dolibarr stock logic:&lt;br /&gt;
* the charges are applied at the real stock movement (&amp;#039;&amp;#039;STOCK_MOVEMENT&amp;#039;&amp;#039; event);&lt;br /&gt;
* they are entered on the document that matches your stock mode;&lt;br /&gt;
* they are locked once applied;&lt;br /&gt;
* they are restored if the stock movement is reversed.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Enter charges from the &amp;#039;&amp;#039;&amp;#039;supplier order&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;supplier invoice&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;reception&amp;#039;&amp;#039;&amp;#039;, depending on your stock setup.&lt;br /&gt;
* Pick the charge invoices (transport, customs...) from a searchable list of supplier invoices, filtered by entity.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;quot;Calculate PMP&amp;quot; button&amp;#039;&amp;#039;&amp;#039;: preview the result before the stock movement.&lt;br /&gt;
* Allocation of charges by &amp;#039;&amp;#039;&amp;#039;quantity&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;value&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;equal share&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* Option to also update the product &amp;#039;&amp;#039;&amp;#039;cost price&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* Protection against double application.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Rollback&amp;#039;&amp;#039;&amp;#039;: reception set back to draft or reopened, supplier invoice set back to draft, supplier order set back to draft (with reverse stock movement).&lt;br /&gt;
* Multi-company compatible.&lt;br /&gt;
* Dedicated permissions.&lt;br /&gt;
&lt;br /&gt;
== Calculation rule ==&lt;br /&gt;
Dolibarr first computes the standard PMP on the stock entry. The module then adds the charge:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
corrected PMP = PMP after movement + (allocated charge / real stock after movement)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This keeps partial receptions and successive documents consistent, without restarting from the initial purchase price.&lt;br /&gt;
&lt;br /&gt;
== Supported stock modes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Active Dolibarr option !! Document where charges are entered !! Automatic application&lt;br /&gt;
|-&lt;br /&gt;
| STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER || Supplier order || On approval&lt;br /&gt;
|-&lt;br /&gt;
| STOCK_CALCULATE_ON_SUPPLIER_BILL || Supplier invoice || On validation&lt;br /&gt;
|-&lt;br /&gt;
| STOCK_CALCULATE_ON_RECEPTION || Reception || On validation&lt;br /&gt;
|-&lt;br /&gt;
| STOCK_CALCULATE_ON_RECEPTION_CLOSE || Reception || On closing&lt;br /&gt;
|}&lt;br /&gt;
The mode &amp;#039;&amp;#039;STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER&amp;#039;&amp;#039; is not supported.&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery widths=400 heights=250&amp;gt;&lt;br /&gt;
File:PMPCharges_charges_block.png|Charges entered on a supplier invoice&lt;br /&gt;
File:PMPCharges_pmp_preview.png|PMP preview before the stock movement&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
# Buy and download the module zip from DoliStore.&lt;br /&gt;
# Go to &amp;#039;&amp;#039;Home &amp;gt; Setup &amp;gt; Modules/Applications &amp;gt; Deploy/install external module&amp;#039;&amp;#039; and upload the zip.&lt;br /&gt;
# Or unzip it manually into &amp;#039;&amp;#039;htdocs/custom/&amp;#039;&amp;#039; so you get &amp;#039;&amp;#039;htdocs/custom/pmpcharges&amp;#039;&amp;#039;.&lt;br /&gt;
# Enable the &amp;#039;&amp;#039;&amp;#039;PMPCharges&amp;#039;&amp;#039;&amp;#039; module.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
# Open &amp;#039;&amp;#039;Setup &amp;gt; Modules/Applications &amp;gt; PMPCharges &amp;gt; Setup&amp;#039;&amp;#039;.&lt;br /&gt;
# Choose the &amp;#039;&amp;#039;&amp;#039;charge allocation type&amp;#039;&amp;#039;&amp;#039;: quantity, value or equal.&lt;br /&gt;
# Choose whether to &amp;#039;&amp;#039;&amp;#039;update the product cost price&amp;#039;&amp;#039;&amp;#039; (yes/no).&lt;br /&gt;
# Check your supplier stock entry mode in &amp;#039;&amp;#039;Setup &amp;gt; Stock&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
* Read PMP charges&lt;br /&gt;
* Create/modify PMP charges&lt;br /&gt;
* Delete PMP charges&lt;br /&gt;
* Calculate PMP (preview)&lt;br /&gt;
&lt;br /&gt;
== Quick check ==&lt;br /&gt;
# Create a supplier document with products (according to your stock mode).&lt;br /&gt;
# Add one or more charges in the PMPCharges block.&lt;br /&gt;
# Click &amp;#039;&amp;#039;&amp;#039;Calculate PMP&amp;#039;&amp;#039;&amp;#039; to preview.&lt;br /&gt;
# Validate the document: the stock movement applies the corrected PMP and locks the charges.&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
;I cannot edit the charges any more&lt;br /&gt;
:They are locked after application. Reverse the stock movement (for example set the reception back to draft) to unlock them.&lt;br /&gt;
&lt;br /&gt;
;The charges block does not appear&lt;br /&gt;
:The block is shown on the document that matches the active stock mode only. Check &amp;#039;&amp;#039;Setup &amp;gt; Stock&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
;Does it change the PMP of products already in stock?&lt;br /&gt;
:Only through the formula above, for the products of the movement concerned.&lt;br /&gt;
&lt;br /&gt;
== Support ==&lt;br /&gt;
* Email: contact@weglob.com&lt;br /&gt;
* Website: [https://weglob.com weglob.com]&lt;br /&gt;
* LinkedIn: [https://www.linkedin.com/in/mohamed-aggoubi/ Mohamed Aggoubi]&lt;br /&gt;
&lt;br /&gt;
[[Category:Complementary modules]]&lt;br /&gt;
[[Category:DocUserEN]]&lt;/div&gt;</summary>
		<author><name>Weglob</name></author>
	</entry>
</feed>