NEW Add prorata account field on customer invoices#38023
Open
mapiolca wants to merge 1 commit intoDolibarr:developfrom
Open
NEW Add prorata account field on customer invoices#38023mapiolca wants to merge 1 commit intoDolibarr:developfrom
mapiolca wants to merge 1 commit intoDolibarr:developfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NEW|New Add prorata account rate on customer invoices
This PR adds the
prorata_accountfield to customer invoices.Purpose of the field
In construction and public works contracts, a prorata account may be used to distribute common site expenses between companies involved in the project.
The prorata account is often applied as a percentage of the invoice amount. This percentage is then used to calculate a prorata account amount deducted from, or applied to, the invoice.
The new
prorata_accountfield stores the prorata account rate applied to the customer invoice.Meaning of the field
prorata_accountstores the prorata account rate used for the invoice.It is not the computed monetary amount. The computed monetary amount is expected to be stored separately.
The value is expressed as a percentage.
For example:
Why this field belongs to llx_facture
The prorata account rate is usually defined at invoice level for a given construction contract or situation invoice.
It is not linked to a specific product or service line. It is a global contractual adjustment applied to the invoice.
Therefore, the field belongs to the invoice header table llx_facture.
Example use case
A customer invoice is issued for a construction project where the contract includes a prorata account of 1.5%.
Example values:
10000.001.50000000150.00000000Stored value:
The prorata account amount can then be calculated and stored separately as:
Future usage
This field will allow future improvements for:
This PR only adds the database field and does not change the invoice calculation logic.
Database change
Variante recommandée avec meilleur nom
Si tu acceptes de renommer, je proposerais plutôt :