Fix html
This commit is contained in:
parent
8222f7a78b
commit
0ae5a3799c
@ -264,13 +264,13 @@ if ($id > 0)
|
|||||||
// Local Taxes
|
// Local Taxes
|
||||||
if ($mysoc->useLocalTax(1))
|
if ($mysoc->useLocalTax(1))
|
||||||
{
|
{
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("LocalTax1IsUsedES").'</td><td colspan="3">';
|
print '<tr><td class="nowrap">'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">';
|
||||||
print yn($object->localtax1_assuj);
|
print yn($object->localtax1_assuj);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
if ($mysoc->useLocalTax(2))
|
if ($mysoc->useLocalTax(2))
|
||||||
{
|
{
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("LocalTax2IsUsedES").'</td><td colspan="3">';
|
print '<tr><td class="nowrap">'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">';
|
||||||
print yn($object->localtax2_assuj);
|
print yn($object->localtax2_assuj);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,7 +54,6 @@ $confirm = GETPOST('confirm','alpha');
|
|||||||
$backtopage = GETPOST('backtopage','alpha');
|
$backtopage = GETPOST('backtopage','alpha');
|
||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
$socid = GETPOST('socid','int');
|
$socid = GETPOST('socid','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
|
||||||
|
|
||||||
$object = new Contact($db);
|
$object = new Contact($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
@ -74,6 +73,7 @@ if (! empty($canvas))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
|
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
|
|||||||
@ -37,9 +37,22 @@ $id = GETPOST('id','int');
|
|||||||
$action = GETPOST("action");
|
$action = GETPOST("action");
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
|
$object = new Contact($db);
|
||||||
|
|
||||||
|
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
|
||||||
|
$object->getCanvas($id);
|
||||||
|
$objcanvas=null;
|
||||||
|
$canvas = (! empty($object->canvas)?$object->canvas:GETPOST("canvas"));
|
||||||
|
if (! empty($canvas))
|
||||||
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php';
|
||||||
|
$objcanvas = new Canvas($db, $action);
|
||||||
|
$objcanvas->getCanvas('contact', 'contactcard', $canvas);
|
||||||
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'contact', $id, '','');
|
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
@ -54,7 +67,6 @@ $pagenext = $page + 1;
|
|||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="name";
|
if (! $sortfield) $sortfield="name";
|
||||||
|
|
||||||
$object = new Contact($db);
|
|
||||||
if ($id > 0) $object->fetch($id);
|
if ($id > 0) $object->fetch($id);
|
||||||
|
|
||||||
$upload_dir = $conf->societe->dir_output.'/contact/'.dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->societe->dir_output.'/contact/'.dol_sanitizeFileName($object->ref);
|
||||||
|
|||||||
@ -2030,24 +2030,6 @@ else
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
|
||||||
/*
|
|
||||||
print '<tr><td class="titlefield nowrap">'.$langs->trans("Ref").'</td><td colspan="4">';
|
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
|
||||||
print '</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
// Ref supplier
|
|
||||||
print '<tr><td>'.$form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,($object->statut<FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer)).'</td><td colspan="4">';
|
|
||||||
print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,($object->statut<FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer));
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Third party
|
|
||||||
print '<tr><td>'.$langs->trans('Supplier').'</td><td colspan="4">'.$societe->getNomUrl(1,'supplier');
|
|
||||||
print ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->socid.'">'.$langs->trans('OtherBills').'</a>)</td>';
|
|
||||||
print '</tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td>';
|
||||||
print $object->getLibType();
|
print $object->getLibType();
|
||||||
|
|||||||
@ -1132,7 +1132,7 @@ else
|
|||||||
}
|
}
|
||||||
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
|
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
|
||||||
|
|
||||||
// Assujeti TVA
|
// Vat is used
|
||||||
print '<tr><td>'.fieldLabel('VATIsUsed','assujtva_value').'</td>';
|
print '<tr><td>'.fieldLabel('VATIsUsed','assujtva_value').'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation
|
print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation
|
||||||
@ -1688,14 +1688,64 @@ else
|
|||||||
}
|
}
|
||||||
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
|
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
|
||||||
|
|
||||||
// VAT payers
|
// VAT is used
|
||||||
print '<tr><td>'.fieldLabel('VATIsUsed','assujtva_value').'</td><td>';
|
print '<tr><td>'.fieldLabel('VATIsUsed','assujtva_value').'</td><td colspan="3">';
|
||||||
print $form->selectyesno('assujtva_value',$object->tva_assuj,1);
|
print $form->selectyesno('assujtva_value',$object->tva_assuj,1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// Local Taxes
|
||||||
|
//TODO: Place into a function to control showing by country or study better option
|
||||||
|
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
|
||||||
|
{
|
||||||
|
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').'</td><td colspan="3">';
|
||||||
|
print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
|
||||||
|
if(! isOnlyOneLocalTax(1))
|
||||||
|
{
|
||||||
|
print '<span class="cblt1"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
|
||||||
|
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</td><td>'.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').'</td><td colspan="3">';
|
||||||
|
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
|
||||||
|
if (! isOnlyOneLocalTax(2))
|
||||||
|
{
|
||||||
|
print '<span class="cblt2"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
|
||||||
|
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
}
|
||||||
|
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
|
||||||
|
{
|
||||||
|
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').'</td><td colspan="3">';
|
||||||
|
print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
|
||||||
|
if(! isOnlyOneLocalTax(1))
|
||||||
|
{
|
||||||
|
print '<span class="cblt1"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
|
||||||
|
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
}
|
||||||
|
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
|
||||||
|
{
|
||||||
|
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').'</td><td colspan="3">';
|
||||||
|
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
|
||||||
|
if(! isOnlyOneLocalTax(2))
|
||||||
|
{
|
||||||
|
print '<span class="cblt2"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
|
||||||
|
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// VAT Code
|
// VAT Code
|
||||||
print '<td>'.fieldLabel('VATIntra','intra_vat').'</td>';
|
print '<td>'.fieldLabel('VATIntra','intra_vat').'</td>';
|
||||||
print '<td>';
|
print '<td colspan="3">';
|
||||||
$s ='<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="'.$object->tva_intra.'">';
|
$s ='<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="'.$object->tva_intra.'">';
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_DISABLEVATCHECK))
|
if (empty($conf->global->MAIN_DISABLEVATCHECK))
|
||||||
@ -1723,56 +1773,6 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Local Taxes
|
|
||||||
//TODO: Place into a function to control showing by country or study better option
|
|
||||||
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
|
|
||||||
{
|
|
||||||
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').'</td><td>';
|
|
||||||
print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
|
|
||||||
if(! isOnlyOneLocalTax(1))
|
|
||||||
{
|
|
||||||
print '<span class="cblt1"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
|
|
||||||
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
|
|
||||||
print '</span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</td><td>'.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').'</td><td>';
|
|
||||||
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
|
|
||||||
if (! isOnlyOneLocalTax(2))
|
|
||||||
{
|
|
||||||
print '<span class="cblt2"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
|
|
||||||
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
|
|
||||||
print '</span>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
}
|
|
||||||
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
|
|
||||||
{
|
|
||||||
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').'</td><td colspan="3">';
|
|
||||||
print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
|
|
||||||
if(! isOnlyOneLocalTax(1))
|
|
||||||
{
|
|
||||||
print '<span class="cblt1"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
|
|
||||||
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
|
|
||||||
print '</span>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
}
|
|
||||||
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
|
|
||||||
{
|
|
||||||
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').'</td><td colspan="3">';
|
|
||||||
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
|
|
||||||
if(! isOnlyOneLocalTax(2))
|
|
||||||
{
|
|
||||||
print '<span class="cblt2"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
|
|
||||||
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
|
|
||||||
print '</span>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Type - Size
|
// Type - Size
|
||||||
print '<tr><td>'.fieldLabel('ThirdPartyType','typent_id').'</td><td class="maxwidthonsmartphone">';
|
print '<tr><td>'.fieldLabel('ThirdPartyType','typent_id').'</td><td class="maxwidthonsmartphone">';
|
||||||
print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||||
@ -2027,7 +2027,7 @@ else
|
|||||||
}
|
}
|
||||||
//if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
|
//if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
|
||||||
|
|
||||||
// VAT payers
|
// VAT is used
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans('VATIsUsed');
|
print $langs->trans('VATIsUsed');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
@ -2035,6 +2035,104 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Local Taxes
|
||||||
|
//TODO: Place into a function to control showing by country or study better option
|
||||||
|
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
|
||||||
|
print yn($object->localtax1_assuj);
|
||||||
|
print '</td></tr><tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
|
||||||
|
print yn($object->localtax2_assuj);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
|
||||||
|
{
|
||||||
|
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
|
||||||
|
print '<input type="hidden" name="action" value="set_localtax1">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<tr><td>'.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).' <a href="'.$_SERVER["PHP_SELF"].'?action=editRE&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
|
||||||
|
if($action == 'editRE')
|
||||||
|
{
|
||||||
|
print '<td align="left">';
|
||||||
|
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<td>'.$object->localtax1_value.'</td>';
|
||||||
|
}
|
||||||
|
print '</tr></form>';
|
||||||
|
}
|
||||||
|
if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
|
||||||
|
{
|
||||||
|
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
|
||||||
|
print '<input type="hidden" name="action" value="set_localtax2">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<tr><td>'.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).'<a href="'.$_SERVER["PHP_SELF"].'?action=editIRPF&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
|
||||||
|
if($action == 'editIRPF'){
|
||||||
|
print '<td align="left">';
|
||||||
|
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
}else{
|
||||||
|
print '<td>'.$object->localtax2_value.'</td>';
|
||||||
|
}
|
||||||
|
print '</tr></form>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
|
||||||
|
print yn($object->localtax1_assuj);
|
||||||
|
print '</td></tr>';
|
||||||
|
if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
|
||||||
|
{
|
||||||
|
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
|
||||||
|
print '<input type="hidden" name="action" value="set_localtax1">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<tr><td> '.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).'<a href="'.$_SERVER["PHP_SELF"].'?action=editRE&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
|
||||||
|
if($action == 'editRE'){
|
||||||
|
print '<td align="left">';
|
||||||
|
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
}else{
|
||||||
|
print '<td>'.$object->localtax1_value.'</td>';
|
||||||
|
}
|
||||||
|
print '</tr></form>';
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
|
||||||
|
print yn($object->localtax2_assuj);
|
||||||
|
print '</td></tr>';
|
||||||
|
if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
|
||||||
|
{
|
||||||
|
|
||||||
|
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
|
||||||
|
print '<input type="hidden" name="action" value="set_localtax2">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<tr><td> '.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).' <a href="'.$_SERVER["PHP_SELF"].'?action=editIRPF&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
|
||||||
|
if($action == 'editIRPF'){
|
||||||
|
print '<td align="left">';
|
||||||
|
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
}else{
|
||||||
|
print '<td>'.$object->localtax2_value.'</td>';
|
||||||
|
}
|
||||||
|
print '</tr></form>';
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
if ($mysoc->country_code=='ES' && $mysoc->localtax2_assuj!="1" && ! empty($conf->fournisseur->enabled) && $object->fournisseur==1)
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">';
|
||||||
|
print yn($object->localtax2_assuj);
|
||||||
|
print '</td><tr>';
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// VAT Code
|
// VAT Code
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="nowrap">'.$langs->trans('VATIntra').'</td><td>';
|
print '<td class="nowrap">'.$langs->trans('VATIntra').'</td><td>';
|
||||||
@ -2074,103 +2172,6 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Local Taxes
|
|
||||||
//TODO: Place into a function to control showing by country or study better option
|
|
||||||
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
|
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
|
|
||||||
print yn($object->localtax1_assuj);
|
|
||||||
print '</td></tr><tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
|
|
||||||
print yn($object->localtax2_assuj);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
|
|
||||||
{
|
|
||||||
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
|
|
||||||
print '<input type="hidden" name="action" value="set_localtax1">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<tr><td>'.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).' <a href="'.$_SERVER["PHP_SELF"].'?action=editRE&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
|
|
||||||
if($action == 'editRE')
|
|
||||||
{
|
|
||||||
print '<td align="left">';
|
|
||||||
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td>'.$object->localtax1_value.'</td>';
|
|
||||||
}
|
|
||||||
print '</tr></form>';
|
|
||||||
}
|
|
||||||
if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
|
|
||||||
{
|
|
||||||
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
|
|
||||||
print '<input type="hidden" name="action" value="set_localtax2">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<tr><td>'.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).'<a href="'.$_SERVER["PHP_SELF"].'?action=editIRPF&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
|
|
||||||
if($action == 'editIRPF'){
|
|
||||||
print '<td align="left">';
|
|
||||||
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
|
||||||
}else{
|
|
||||||
print '<td>'.$object->localtax2_value.'</td>';
|
|
||||||
}
|
|
||||||
print '</tr></form>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
|
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
|
|
||||||
print yn($object->localtax1_assuj);
|
|
||||||
print '</td><tr>';
|
|
||||||
if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
|
|
||||||
{
|
|
||||||
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
|
|
||||||
print '<input type="hidden" name="action" value="set_localtax1">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<tr><td> '.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).'<a href="'.$_SERVER["PHP_SELF"].'?action=editRE&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
|
|
||||||
if($action == 'editRE'){
|
|
||||||
print '<td align="left">';
|
|
||||||
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
|
||||||
}else{
|
|
||||||
print '<td>'.$object->localtax1_value.'</td>';
|
|
||||||
}
|
|
||||||
print '</tr></form>';
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
|
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
|
|
||||||
print yn($object->localtax2_assuj);
|
|
||||||
print '</td><tr>';
|
|
||||||
if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
|
|
||||||
{
|
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
|
|
||||||
print '<input type="hidden" name="action" value="set_localtax2">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<tr><td> '.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).' <a href="'.$_SERVER["PHP_SELF"].'?action=editIRPF&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
|
|
||||||
if($action == 'editIRPF'){
|
|
||||||
print '<td align="left">';
|
|
||||||
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
|
||||||
}else{
|
|
||||||
print '<td>'.$object->localtax2_value.'</td>';
|
|
||||||
}
|
|
||||||
print '</tr></form>';
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
if ($mysoc->country_code=='ES' && $mysoc->localtax2_assuj!="1" && ! empty($conf->fournisseur->enabled) && $object->fournisseur==1)
|
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">';
|
|
||||||
print yn($object->localtax2_assuj);
|
|
||||||
print '</td><tr>';
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// Type + Staff
|
// Type + Staff
|
||||||
$arr = $formcompany->typent_array(1);
|
$arr = $formcompany->typent_array(1);
|
||||||
$object->typent= $arr[$object->typent_code];
|
$object->typent= $arr[$object->typent_code];
|
||||||
@ -2185,6 +2186,26 @@ else
|
|||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border tableforfield" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
|
// Tags / categories
|
||||||
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
|
{
|
||||||
|
// Customer
|
||||||
|
if ($object->prospect || $object->client) {
|
||||||
|
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
|
||||||
|
print '<td>';
|
||||||
|
print $form->showCategories($object->id, 'customer', 1);
|
||||||
|
print "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Supplier
|
||||||
|
if ($object->fournisseur) {
|
||||||
|
print '<tr><td>' . $langs->trans("SuppliersCategoriesShort") . '</td>';
|
||||||
|
print '<td>';
|
||||||
|
print $form->showCategories($object->id, 'supplier', 1);
|
||||||
|
print "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Legal
|
// Legal
|
||||||
print '<tr><td class="titlefield">'.$langs->trans('JuridicalStatus').'</td><td>'.$object->forme_juridique.'</td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans('JuridicalStatus').'</td><td>'.$object->forme_juridique.'</td></tr>';
|
||||||
|
|
||||||
@ -2207,26 +2228,6 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tags / categories
|
|
||||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
|
||||||
{
|
|
||||||
// Customer
|
|
||||||
if ($object->prospect || $object->client) {
|
|
||||||
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $form->showCategories($object->id, 'customer', 1);
|
|
||||||
print "</td></tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Supplier
|
|
||||||
if ($object->fournisseur) {
|
|
||||||
print '<tr><td>' . $langs->trans("SuppliersCategoriesShort") . '</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $form->showCategories($object->id, 'supplier', 1);
|
|
||||||
print "</td></tr>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled))
|
if (!empty($conf->incoterm->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user