Skip to content
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 : Duplicate ref_client from order origin to intervention. #30000

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

dolibarr95
Copy link
Contributor

NEW[Duplicate ref_client order origin to intervention]

When creating an intervention from an order, duplicate the ref_client (as is already done for public and private notes).

dolibarr95 and others added 2 commits June 12, 2024 15:21
When creating an intervention from an order, duplicate the ref_client (as is already done for public and private notes).
@dolibarr95
Copy link
Contributor Author

🥳 https://www.dolibarr.fr/forum/t/et-le-prix-de-la-30000eme-pr-revient-a/46690

@@ -882,6 +882,7 @@

$soc = $objectsrc->thirdparty;

$ref_client = (!empty($objectsrc->ref_client) ? $objectsrc->ref_client : GETPOST('ref_client', 'alpha'));
Copy link
Member

@eldy eldy Jun 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imagine you clone an intervention from a proposal.
The proposal has the ref PRABC for you and the proposal has the ref PR456 on customer side (so ref_client is PR456).

If you copy the ref of proposal into the intervention, you will got the ref of intervention that is
IN123 and the reference of this intervention into the customer system of the client will be saved as PR456.
But this is a reference of a proposal not of an intervention. You are mixing apple and pear here. So i suggest you introduce a hidden option
INTERVENTION_SET_CUSTOMER_PROPOSAL_REF_WITH_CUSTOMER_INTERVENTION_REF

@eldy eldy added the PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do) label Jun 15, 2024
Add the INTERVENTION_SET_CUSTOMER_PROPOSAL_REF_WITH_CUSTOMER_INTERVENTION_REF hidden option under @eldy's advice.
@dolibarr95
Copy link
Contributor Author

Hello
@eldy tks for reading and feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants