New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NEW: payment conditions enabling semi-automatic deposit creation (Issue #18439) #18853
Conversation
…s + get from origin document or company
… an origin with the corresponding payment conditions
…ent terms with deposits in select + UI
…an invoices and template invoices
…EW_deposit_payment_terms
…NEW_deposit_payment_terms
…bel with bespoke substitution key
… install/migration
@eldy All good for me, you can review ;) |
…EW_deposit_payment_terms
…alls to new parameter added in between PRs
@eldy: conflicts solved ;) |
htdocs/comm/propal/card.php
Outdated
@@ -397,6 +397,7 @@ | |||
$object->warehouse_id = GETPOST('warehouse_id', 'int'); | |||
$object->duree_validite = $duration; | |||
$object->cond_reglement_id = GETPOST('cond_reglement_id'); | |||
$object->deposit_percent = GETPOST('cond_reglement_id_deposit_percent', 'int'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use here deposit_percent = alpha so we will be able to enhance in future the field with
"30:30:20:10"
for example for deposit of 30% then invoice of 30%, then 20% , etc...
@@ -92,6 +92,7 @@ create table llx_societe | |||
remise_supplier real DEFAULT 0, -- discount by default granted by this supplier | |||
mode_reglement tinyint, -- payment mode customer | |||
cond_reglement tinyint, -- payment term customer | |||
deposit_percent real DEFAULT NULL, -- default deposit % if payment term needs it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use a string here. Goal is to be able in future to store here complex rules with a given string syntax.
…EW_deposit_payment_terms
…alue if not defined
@eldy : All done : conflicts solved, fields and checks changed to strings, getDictvalue() renamed to getDictionaryValue() and a couple of other bugs fixed ;) |
@eldy : Can you please make a feedback on this PR if still needed ? |
Great feature, long awaited! |
@marc-dll can you fix confllicts and repush pr ? |
…EW_deposit_payment_terms
…EW_deposit_payment_terms
@eldy It should be ok now |
…EW_deposit_payment_terms
@eldy : conflicts solved again, it would be really nice for this to be done once and for all ;) |
I began implementing issue #18439, considering input from the following forum discussion : https://www.dolibarr.fr/forum/t/demande-davis-sur-fonctionnalite-acompte-automatique/37824
@eldy I will update regularly until it is ready to be fully reviewed and merged. Feel free to comment if you see anything disturbing ;)