|
71 | 71 | <div class="caption-subject font-green-sharp bold uppercase">'.$langs->trans("Organization").' <small>('.$langs->trans("Code").' '.dolPrintHTML($mythirdpartyaccount->code_client).')</small></div> |
72 | 72 | </div> |
73 | 73 | <div class="portlet-body"> |
74 | | -
|
| 74 | + <!-- form for company profile --> |
75 | 75 | <form action="'.$_SERVER["PHP_SELF"].'" method="post" name="formsoc"> |
76 | 76 | <input type="hidden" name="token" value="'.newToken().'"> |
77 | 77 | <input type="hidden" name="action" value="updatemythirdpartyaccount"> |
|
101 | 101 | <input type="text" class="form-control" name="stateorcounty" value=""> |
102 | 102 | </div> |
103 | 103 | <div class="form-group"> |
104 | | - <label>'.$langs->trans("Country").'</label><br>'; |
| 104 | + <label>'.$langs->trans("Country").'</label> '; |
105 | 105 | $countryselected = (GETPOSTISSET('country_id') ? GETPOST('country_id', 'aZ09') : $mythirdpartyaccount->country_id); |
106 | 106 | $exclude_country_code = array(); |
107 | 107 | if (getDolGlobalString('SELLYOURSAAS_EXCLUDE_COUNTRY_CODES')) { |
|
111 | 111 | print $form->select_country($countryselected, 'country_id', '', 0, 'minwidth300', 'code2', 0, 1, 0, $exclude_country_code); |
112 | 112 | print '</div>'."\n"; |
113 | 113 |
|
| 114 | + |
114 | 115 | if (!getDolGlobalInt('SELLYOURSAAS_ONLY_NON_PROFIT_ORGA')) { |
| 116 | + // VAT Section |
115 | 117 | print '<div class="form-group"> |
116 | 118 | <label>'.$langs->trans("VATIntra").'</label> '; |
117 | 119 | if (! empty($mythirdpartyaccount->tva_assuj) && empty($mythirdpartyaccount->tva_intra)) { |
|
130 | 132 | } |
131 | 133 |
|
132 | 134 | print ' |
133 | | - <br> |
134 | | - <input type="hidden" name="vatassuj_old" value="'.($mythirdpartyaccount->tva_assuj).'"> |
| 135 | + <br><br> |
| 136 | + <input type="hidden" name="vatassuj_old" value="'.$mythirdpartyaccount->tva_assuj.'"> |
135 | 137 | <input type="checkbox" style="margin-bottom: 3px;" class="inline-block valignmiddle"'.($mythirdpartyaccount->tva_assuj ? ' checked="checked"' : '').' id="vatassuj" name="vatassuj"> <label for="vatassuj" class="valignmiddle nobold">'.$langs->trans("IHaveAVATID").'</label> |
136 | 138 | <br> |
137 | 139 | <input type="hidden" name="vatnumber_old" value="'.$mythirdpartyaccount->tva_intra.'"> |
|
165 | 167 | print $s; |
166 | 168 | } |
167 | 169 | print '</div>'."\n"; |
| 170 | + |
| 171 | + |
| 172 | + // ID Prof section |
| 173 | + $placeholderforprofid = ''; |
| 174 | + $mandatoryprofid = 0; |
| 175 | + if ($mythirdpartyaccount->country_code == 'FR') { |
| 176 | + //$placeholderforprofid='Exemple: FR12345678'; |
| 177 | + $mandatoryprofid = 1; |
| 178 | + } elseif ($mythirdpartyaccount->country_code == 'BE') { |
| 179 | + //$placeholderforprofid='Exemple: BE12345678'; |
| 180 | + } elseif ($mythirdpartyaccount->country_code == 'ES') { |
| 181 | + //$placeholderforprofid='Exemple: ES12345678'; |
| 182 | + } else { |
| 183 | + //$placeholderforprofid=$langs->trans("EnterVATHere"); |
| 184 | + } |
| 185 | + |
| 186 | + print '<div class="form-group"> |
| 187 | + <label>'.$langs->transcountry("ProfId", $mythirdpartyaccount->country_code).'</label> '; |
| 188 | + if ($mandatoryprofid && ! empty($mythirdpartyaccount->idprof1) && empty($mythirdpartyaccount->idprof1)) { |
| 189 | + print img_warning($langs->trans("Mandatory"), '', 'hideifnoprof'); |
| 190 | + } |
| 191 | + |
| 192 | + print ' |
| 193 | + <br><br> |
| 194 | + <input type="hidden" name="profid_old" value="'.$mythirdpartyaccount->idprof1.'"> |
| 195 | + <input type="text" class="input-small quatrevingtpercent" value="'.$mythirdpartyaccount->idprof1.'" name="profid" id="profid" placeholder="'.$placeholderforprofid.'"> |
| 196 | + '; |
| 197 | + print "\n"; |
| 198 | + /* |
| 199 | + print '<script>'; |
| 200 | + print '$( document ).ready(function() {'."\n"; |
| 201 | + print '$("#profid").keyup(function() {'."\n"; |
| 202 | + print " console.log('We change the profid='+$('#profid').val());\n"; |
| 203 | + print " if ($('#profid').val() != '') { $('#profid').prop('checked', true ); }\n"; |
| 204 | + print '});'."\n"; |
| 205 | + print '});'."\n"; |
| 206 | + print '</script>'; |
| 207 | + print "\n"; |
| 208 | + */ |
| 209 | + |
| 210 | + print '</div>'."\n"; |
168 | 211 | } |
169 | 212 |
|
170 | 213 | print ' |
|
0 commit comments