Merge pull request #421 from atm-maxime/develop
Task # 355 : Add link "autfill contact address with third party address"
This commit is contained in:
commit
ee3d956919
@ -377,13 +377,20 @@ else
|
||||
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript" language="javascript">'."\n";
|
||||
print 'jQuery(document).ready(function () {
|
||||
jQuery("#selectcountry_id").change(function() {
|
||||
document.formsoc.action.value="create";
|
||||
document.formsoc.submit();
|
||||
});
|
||||
})';
|
||||
|
||||
$("#copyaddressfromsoc").click(function() {
|
||||
$(\'textarea[name="address"]\').text("'.addslashes($objsoc->address).'");
|
||||
$(\'input[name="zipcode"]\').val("'.addslashes($objsoc->zip).'");
|
||||
$(\'input[name="town"]\').val("'.addslashes($objsoc->town).'");
|
||||
$(\'select[name="country_id"]\').val("'.addslashes($objsoc->country_id).'");
|
||||
});
|
||||
})'."\n";
|
||||
print '</script>'."\n";
|
||||
}
|
||||
|
||||
@ -426,7 +433,9 @@ else
|
||||
|
||||
// Address
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3"><textarea class="flat" name="address" cols="70">'.(isset($_POST["address"])?$_POST["address"]:$object->address).'</textarea></td>';
|
||||
print '<tr><td>'.$langs->trans("Address");
|
||||
if ($conf->use_javascript_ajax) print '<br /><a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a></td>';
|
||||
print '<td colspan="3"><textarea class="flat" name="address" cols="70">'.(isset($_POST["address"])?$_POST["address"]:$object->address).'</textarea></td>';
|
||||
|
||||
// Zip / Town
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party
|
||||
|
||||
@ -77,6 +77,7 @@ Poste= Position
|
||||
DefaultLang=Language by default
|
||||
VATIsUsed=VAT is used
|
||||
VATIsNotUsed=VAT is not used
|
||||
CopyAddressFromSoc=Copy address from company
|
||||
##### Local Taxes #####
|
||||
LocalTax1IsUsedES= RE is used
|
||||
LocalTax1IsNotUsedES= RE is not used
|
||||
|
||||
@ -79,6 +79,7 @@ Poste= Poste
|
||||
DefaultLang=Langue par défaut
|
||||
VATIsUsed=Assujetti à TVA
|
||||
VATIsNotUsed=Non assujetti à TVA
|
||||
CopyAddressFromSoc=Copier l'adresse de la société
|
||||
##### Local Taxes #####
|
||||
LocalTax1IsUsedES= Assujetti à RE
|
||||
LocalTax1IsNotUsedES= Non assujetti à RE
|
||||
|
||||
Loading…
Reference in New Issue
Block a user