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

 fix:allow customer and supplier codes bigger than 15 chars #16480

Closed
wants to merge 2 commits into from

Conversation

bafbes
Copy link
Contributor

@bafbes bafbes commented Feb 27, 2021

Instructions

This is a template to help you make good pull requests. You may use Github Markdown syntax to format your issue report.
Please:

  • only keep the "Fix", "Close" or "New" section
  • follow the project contributing guidelines
  • replace the bracket enclosed textswith meaningful informations

Fix #[issue_number Short description]

[Long description]

Close #[issue_number Short description]

[Long description]

New [Short description]

[Long description]

@@ -2224,6 +2225,344 @@ function init_supplier_categ() {
print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''));
print '</td></tr>';
}
=======
Copy link
Member

Choose a reason for hiding this comment

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

What is this ?

print '<table class="nobordernopadding"><tr><td>';
$tmpcode = $object->code_fournisseur;
if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) $tmpcode = $modCodeFournisseur->getNextValue($object, 1);
print '<input type="text" name="supplier_code" id="supplier_code" class="maxwidthonsmartphone" value="'.dol_escape_htmltag($tmpcode).'" >';
Copy link
Member

@eldy eldy Feb 28, 2021

Choose a reason for hiding this comment

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

What happen if we enter a value with 300 chars ?
Field in database is limited to 24, so we should have maxlength = 24.

eldy added a commit that referenced this pull request Feb 28, 2021
@bafbes
Copy link
Contributor Author

bafbes commented Feb 28, 2021

I think that only 24 chars are saved as limited in llx_societe table with code_client varchar(24)

@eldy
Copy link
Member

eldy commented Mar 1, 2021

With another PR, i modified max from 15 to 24

@eldy eldy closed this Mar 1, 2021
@bafbes bafbes deleted the abb120371 branch May 21, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants