2
0
forked from Wavyzz/dolibarr

Look and feel v12

This commit is contained in:
Laurent Destailleur
2020-03-28 15:20:26 +01:00
parent ec83f18944
commit d5b107211f
15 changed files with 107 additions and 105 deletions

View File

@@ -110,56 +110,60 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="oddeven liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n"; print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
// Name // Name
print '<tr><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>'; print '<tr class="oddeven"><td><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_NAME?$conf->global->MAIN_INFO_ACCOUNTANT_NAME: GETPOST("nom", 'nohtml')) . '"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'></td></tr>'."\n"; print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_NAME?$conf->global->MAIN_INFO_ACCOUNTANT_NAME: GETPOST("nom", 'nohtml')) . '"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'></td></tr>'."\n";
// Address // Address
print '<tr><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>'; print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS?$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS: GETPOST("address", 'nohtml')) . '</textarea></td></tr>'."\n"; print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS?$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS: GETPOST("address", 'nohtml')) . '</textarea></td></tr>'."\n";
print '<tr><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>'; print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_ZIP?$conf->global->MAIN_INFO_ACCOUNTANT_ZIP: GETPOST("zipcode", 'alpha')) . '"></td></tr>'."\n"; print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_ZIP?$conf->global->MAIN_INFO_ACCOUNTANT_ZIP: GETPOST("zipcode", 'alpha')) . '"></td></tr>'."\n";
print '<tr><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>'; print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_TOWN?$conf->global->MAIN_INFO_ACCOUNTANT_TOWN: GETPOST("town", 'nohtml')) . '"></td></tr>'."\n"; print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_TOWN?$conf->global->MAIN_INFO_ACCOUNTANT_TOWN: GETPOST("town", 'nohtml')) . '"></td></tr>'."\n";
// Country // Country
print '<tr><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">'; print '<tr class="oddeven"><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization
print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id'); print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '<tr><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">'; print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
$formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id'); $formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id');
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '<tr><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>'; print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
print '<input name="tel" id="phone" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_PHONE . '"></td></tr>'; print '<input name="tel" id="phone" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_PHONE . '"></td></tr>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '<tr><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>'; print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
print '<input name="fax" id="fax" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_FAX . '"></td></tr>'; print '<input name="fax" id="fax" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_FAX . '"></td></tr>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '<tr><td><label for="email">'.$langs->trans("EMail").'</label></td><td>'; print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
print img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
print '<input name="mail" id="email" class="minwidth200" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_MAIL . '"></td></tr>'; print '<input name="mail" id="email" class="minwidth200" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_MAIL . '"></td></tr>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// Web // Web
print '<tr><td><label for="web">'.$langs->trans("Web").'</label></td><td>'; print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
print img_picto('', 'globe', '', false, 0, 0, '', 'paddingright');
print '<input name="web" id="web" class="minwidth300" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_WEB . '"></td></tr>'; print '<input name="web" id="web" class="minwidth300" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_WEB . '"></td></tr>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// Code // Code
print '<tr><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>'; print '<tr class="oddeven"><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>';
print '<input name="code" id="code" class="minwidth100" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_CODE?$conf->global->MAIN_INFO_ACCOUNTANT_CODE: GETPOST("code", 'nohtml')) . '"></td></tr>'."\n"; print '<input name="code" id="code" class="minwidth100" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_CODE?$conf->global->MAIN_INFO_ACCOUNTANT_CODE: GETPOST("code", 'nohtml')) . '"></td></tr>'."\n";
// Note // Note
print '<tr><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>'; print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note', 'none') ? GETPOST('note', 'none') : $conf->global->MAIN_INFO_ACCOUNTANT_NOTE).'</textarea></td></tr>'; print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note', 'none') ? GETPOST('note', 'none') : $conf->global->MAIN_INFO_ACCOUNTANT_NOTE).'</textarea></td></tr>';
print '</td></tr>'; print '</td></tr>';

View File

@@ -695,26 +695,24 @@ print "</table>";
print '<br>'; print '<br>';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="140">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>'; print '<td width="25%">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"use_vat\" value=\"1\"".(empty($conf->global->FACTURE_TVAOPTION) ? "" : " checked")."> ".$langs->trans("VATIsUsed")."</label></td>"; print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"use_vat\" value=\"1\"".(empty($conf->global->FACTURE_TVAOPTION) ? "" : " checked")."> ".$langs->trans("VATIsUsed")."</label></td>";
print '<td colspan="2">'; print '<td colspan="2">';
print "<table>"; $tooltiphelp = '';
print "<tr><td><label for=\"use_vat\">".$langs->trans("VATIsUsedDesc")."</label></td></tr>"; if ($mysoc->country_code == 'FR') $tooltiphelp = '<i>'.$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i>";
if ($mysoc->country_code == 'FR') print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n"; print "<label for=\"use_vat\">".$form->textwithpicto($langs->trans("VATIsUsedDesc"), $tooltiphelp)."</label>";
print "</table>";
print "</td></tr>\n"; print "</td></tr>\n";
print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"no_vat\" value=\"0\"".(empty($conf->global->FACTURE_TVAOPTION) ? " checked" : "")."> ".$langs->trans("VATIsNotUsed")."</label></td>"; print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"no_vat\" value=\"0\"".(empty($conf->global->FACTURE_TVAOPTION) ? " checked" : "")."> ".$langs->trans("VATIsNotUsed")."</label></td>";
print '<td colspan="2">'; print '<td colspan="2">';
print "<table>"; $tooltiphelp = '';
print "<tr><td><label for=\"no_vat\">".$langs->trans("VATIsNotUsedDesc")."</label></td></tr>"; if ($mysoc->country_code == 'FR') $tooltiphelp = "<i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i>\n";
if ($mysoc->country_code == 'FR') print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n"; print "<label for=\"no_vat\">".$form->textwithpicto($langs->trans("VATIsNotUsedDesc"), $tooltiphelp)."</label>";
print "</table>";
print "</td></tr>\n"; print "</td></tr>\n";
print "</table>"; print "</table>";
@@ -728,40 +726,35 @@ if ($mysoc->useLocalTax(1))
print '<br>'; print '<br>';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="140">'.$langs->transcountry("LocalTax1Management", $mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>'; print '<td width="25%">'.$langs->transcountry("LocalTax1Management", $mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option // Note: When option is not set, it must not appears as set on on, because there is no default value for this option
print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax1\" id=\"lt1\" value=\"localtax1on\"".(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on") ? " checked" : "")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."</td>"; print "<tr class=\"oddeven\"><td><input type=\"radio\" name=\"optionlocaltax1\" id=\"lt1\" value=\"localtax1on\"".(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on") ? " checked" : "")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."</td>";
print '<td colspan="2">'; print '<td colspan="2">';
print '<table class="nobordernopadding">'; print '<div class="nobordernopadding">';
print "<tr><td><label for=\"lt1\">".$langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code)."</label></td></tr>"; $tooltiphelp = $langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code);
$example = $langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code); $tooltiphelp = ($tooltiphelp != "LocalTax1IsUsedExample" ? "<i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."</i>\n" : "");
print ($example != "LocalTax1IsUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."</i></td></tr>\n" : ""); print "<label for=\"lt1\">".$form->textwithpicto($langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code), $tooltiphelp)."</label>";
if (!isOnlyOneLocalTax(1)) if (!isOnlyOneLocalTax(1))
{ {
print '<tr><td class="left"><label for="lt1">'.$langs->trans("LTRate").'</label>: '; print '<br><label for="lt1">'.$langs->trans("LTRate").'</label>: ';
$formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1"); $formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1");
print '</td></tr>';
} }
$opcions = array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"), $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"), $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc")); $opcions = array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"), $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"), $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"));
print '<tr><td class="left"></label for="clt1">'.$langs->trans("CalcLocaltax").'</label>: '; print '<br><label for="clt1">'.$langs->trans("CalcLocaltax").'</label>: ';
print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1);
print '</td></tr>'; print "</div>";
print "</table>";
print "</td></tr>\n"; print "</td></tr>\n";
print "<tr class=\"oddeven\"><td><input type=\"radio\" name=\"optionlocaltax1\" id=\"nolt1\" value=\"localtax1off\"".((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off") ? " checked" : "")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."</td>";
print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax1\" id=\"nolt1\" value=\"localtax1off\"".((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off") ? " checked" : "")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."</td>";
print '<td colspan="2">'; print '<td colspan="2">';
print "<table>"; $tooltiphelp = $langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code);
print "<tr><td><label for=\"nolt1\">".$langs->transcountry("LocalTax1IsNotUsedDesc", $mysoc->country_code)."</label></td></tr>"; $tooltiphelp = ($tooltiphelp != "LocalTax1IsNotUsedExample" ? "<i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."</i>\n" : "");
$example = $langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code); print "<label for=\"nolt1\">".$form->textwithpicto($langs->transcountry("LocalTax1IsNotUsedDesc", $mysoc->country_code), $tooltiphelp)."</label>";
print ($example != "LocalTax1IsNotUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
print "</table>";
print "</td></tr>\n"; print "</td></tr>\n";
print "</table>"; print "</table>";
} }
@@ -771,38 +764,34 @@ if ($mysoc->useLocalTax(2))
print '<br>'; print '<br>';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->transcountry("LocalTax2Management", $mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>'; print '<td width="25%">'.$langs->transcountry("LocalTax2Management", $mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option // Note: When option is not set, it must not appears as set on on, because there is no default value for this option
print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax2\" id=\"lt2\" value=\"localtax2on\"".(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on") ? " checked" : "")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."</td>"; print "<tr class=\"oddeven\"><td><input type=\"radio\" name=\"optionlocaltax2\" id=\"lt2\" value=\"localtax2on\"".(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on") ? " checked" : "")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."</td>";
print '<td colspan="2">'; print '<td colspan="2">';
print '<table class="nobordernopadding">'; print '<div class="nobordernopadding">';
print "<tr><td><label for=\"lt2\">".$langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code)."</label></td></tr>"; print "<label for=\"lt2\">".$langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code)."</label>";
$example = $langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code); $tooltiphelp = $langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code);
print ($example != "LocalTax2IsUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."</i></td></tr>\n" : ""); $tooltiphelp = ($tooltiphelp != "LocalTax2IsUsedExample" ? "<i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."</i>\n" : "");
if (!isOnlyOneLocalTax(2)) if (!isOnlyOneLocalTax(2))
{ {
print '<tr><td class="left"><label for="lt2">'.$langs->trans("LTRate").'</label>: '; print '<br><label for="lt2">'.$langs->trans("LTRate").'</label>: ';
$formcompany->select_localtax(2, $conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2"); $formcompany->select_localtax(2, $conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2");
print '</td></tr>';
} }
print '<tr><td class="left"><label for="clt2">'.$langs->trans("CalcLocaltax").'</label>: '; print '<br><label for="clt2">'.$langs->trans("CalcLocaltax").'</label>: ';
print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2);
print '</td></tr>'; print "</div>";
print "</table>";
print "</td></tr>\n"; print "</td></tr>\n";
print "<tr class=\"oddeven\"><td><input type=\"radio\" name=\"optionlocaltax2\" id=\"nolt2\" value=\"localtax2off\"".((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off") ? " checked" : "")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."</td>";
print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax2\" id=\"nolt2\" value=\"localtax2off\"".((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off") ? " checked" : "")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."</td>";
print '<td colspan="2">'; print '<td colspan="2">';
print "<table>"; print "<div>";
print "<tr><td><label for=\"nolt2\">".$langs->transcountry("LocalTax2IsNotUsedDesc", $mysoc->country_code)."</label></td></tr>"; $tooltiphelp = $langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code);
$example = $langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code); $tooltiphelp = ($tooltiphelp != "LocalTax2IsNotUsedExample" ? "<i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."</i>\n" : "");
print ($example != "LocalTax2IsNotUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."</i></td></tr>\n" : ""); print "<label for=\"nolt2\">".$form->textwithpicto($langs->transcountry("LocalTax2IsNotUsedDesc", $mysoc->country_code), $tooltiphelp)."</label>";
print "</table>"; print "</div>";
print "</td></tr>\n"; print "</td></tr>\n";
print "</table>"; print "</table>";
} }

View File

@@ -207,7 +207,7 @@ llxHeader();
print load_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"), '', 'title_setup'); print load_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"), '', 'title_setup');
print '<span class="opacitymedium">'.$langs->transnoentities("DelaysOfToleranceDesc", img_warning()); print '<span class="opacitymedium">'.$langs->transnoentities("DelaysOfToleranceDesc", img_warning('default', '', 'pictowarning nopaddingleft'));
print " ".$langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php')."</span><br>\n"; print " ".$langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php')."</span><br>\n";
print "<br>\n"; print "<br>\n";

View File

@@ -207,29 +207,29 @@ if (empty($mysoc->country_code))
else else
{ {
// Show examples // Show examples
print '<b>'.$langs->trans("ExamplesWithCurrentSetup").":</b><br>\n"; print load_fiche_titre($langs->trans("ExamplesWithCurrentSetup"), '', '');
// Always show vat rates with vat 0 // Always show vat rates with vat 0
$s=2/7;$qty=1;$vat=0; $s=2/7;$qty=1;$vat=0;
$tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc); $tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc);
print $langs->trans("UnitPriceOfProduct").": ".price2num($s, 'MU'); print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
print " x ".$langs->trans("Quantity").": ".$qty; print " x ".$langs->trans("Quantity").": ".$qty;
print " - ".$langs->trans("VAT").": ".$vat.'%'; print " - ".$langs->trans("VAT").": ".$vat.'%';
print " &nbsp; -> &nbsp; ".$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n"; print ' &nbsp; -> &nbsp; <span class="opacitymedium">'.$langs->trans("TotalPriceAfterRounding").":</span> ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n";
$s=10/3;$qty=1;$vat=0; $s=10/3;$qty=1;$vat=0;
$tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc); $tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc);
print $langs->trans("UnitPriceOfProduct").": ".price2num($s, 'MU'); print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
print " x ".$langs->trans("Quantity").": ".$qty; print " x ".$langs->trans("Quantity").": ".$qty;
print " - ".$langs->trans("VAT").": ".$vat.'%'; print " - ".$langs->trans("VAT").": ".$vat.'%';
print " &nbsp; -> &nbsp; ".$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n"; print ' &nbsp; -> &nbsp; <span class="opacitymedium">'.$langs->trans("TotalPriceAfterRounding").":</span> ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n";
$s=10/3;$qty=2;$vat=0; $s=10/3;$qty=2;$vat=0;
$tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc); $tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc);
print $langs->trans("UnitPriceOfProduct").": ".price2num($s, 'MU'); print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
print " x ".$langs->trans("Quantity").": ".$qty; print " x ".$langs->trans("Quantity").": ".$qty;
print " - ".$langs->trans("VAT").": ".$vat.'%'; print " - ".$langs->trans("VAT").": ".$vat.'%';
print " &nbsp; -> &nbsp; ".$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n"; print ' &nbsp; -> &nbsp; <span class="opacitymedium">'.$langs->trans("TotalPriceAfterRounding").":</span> ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n";
// Add vat rates examples specific to country // Add vat rates examples specific to country
$vat_rates=array(); $vat_rates=array();
@@ -261,10 +261,10 @@ else
{ {
$s=10/3; $s=10/3;
$tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc); $tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc);
print $langs->trans("UnitPriceOfProduct").": ".price2num($s, 'MU'); print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
print " x ".$langs->trans("Quantity").": ".$qty; print " x ".$langs->trans("Quantity").": ".$qty;
print " - ".$langs->trans("VAT").": ".$vat.'%'; print " - ".$langs->trans("VAT").": ".$vat.'%';
print " &nbsp; -> &nbsp; ".$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n"; print ' &nbsp; -> &nbsp; <span class="opacitymedium">'.$langs->trans("TotalPriceAfterRounding").":</span> ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n";
} }
} }
} }
@@ -276,17 +276,17 @@ else
$s=10/3;$qty=1;$vat=10; $s=10/3;$qty=1;$vat=10;
$tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc); $tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc);
print $langs->trans("UnitPriceOfProduct").": ".price2num($s, 'MU'); print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
print " x ".$langs->trans("Quantity").": ".$qty; print " x ".$langs->trans("Quantity").": ".$qty;
print " - ".$langs->trans("VAT").": ".$vat.'%'; print " - ".$langs->trans("VAT").": ".$vat.'%';
print " &nbsp; -> &nbsp; ".$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n"; print ' &nbsp; -> &nbsp; <span class="opacitymedium">'.$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n";
$s=10/3;$qty=2;$vat=10; $s=10/3;$qty=2;$vat=10;
$tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc); $tmparray=calcul_price_total(1, $qty*price2num($s, 'MU'), 0, $vat, 0, 0, 0, 'HT', 0, 0, $mysoc);
print $langs->trans("UnitPriceOfProduct").": ".price2num($s, 'MU'); print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
print " x ".$langs->trans("Quantity").": ".$qty; print " x ".$langs->trans("Quantity").": ".$qty;
print " - ".$langs->trans("VAT").": ".$vat.'%'; print " - ".$langs->trans("VAT").": ".$vat.'%';
print " &nbsp; -> &nbsp; ".$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n"; print ' &nbsp; -> &nbsp; <span class="opacitymedium">'.$langs->trans("TotalPriceAfterRounding").":</span> ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n";
} }
// Important: can debug rounding, to simulate the rounded total // Important: can debug rounding, to simulate the rounded total

View File

@@ -375,7 +375,11 @@ class FormProjets
} }
if (! empty($show_empty)) { if (! empty($show_empty)) {
$out.= '<option value="0" class="optiongrey">'; $out.= '<option value="0" class="optiongrey">';
if (! is_numeric($show_empty)) $out.=$show_empty; if (! is_numeric($show_empty)) {
//if (! empty($conf->use_javascript_ajax)) $out .= '<span class="opacitymedium">aaa';
$out.=$show_empty;
//if (! empty($conf->use_javascript_ajax)) $out .= '</span>';
}
else $out.='&nbsp;'; else $out.='&nbsp;';
$out.= '</option>'; $out.= '</option>';
} }

View File

@@ -3195,6 +3195,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext];
$facolor = '#444'; $facolor = '#444';
} }
elseif ($pictowithouttext == 'delete') {
$fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext];
}
elseif ($pictowithouttext == 'edit') { elseif ($pictowithouttext == 'edit') {
$facolor = '#444'; $facolor = '#444';
$fakey = 'fa-pencil-alt'; $fakey = 'fa-pencil-alt';

View File

@@ -240,6 +240,7 @@ LatestModifiedProjects=Latest %s modified projects
OtherFilteredTasks=Other filtered tasks OtherFilteredTasks=Other filtered tasks
NoAssignedTasks=No assigned tasks found (assign project/tasks to the current user from the top select box to enter time on it) NoAssignedTasks=No assigned tasks found (assign project/tasks to the current user from the top select box to enter time on it)
ThirdPartyRequiredToGenerateInvoice=A third party must be defined on project to be able to invoice it. ThirdPartyRequiredToGenerateInvoice=A third party must be defined on project to be able to invoice it.
ChooseANotYetAssignedTask=Choose a task not yet assigned to you
# Comments trans # Comments trans
AllowCommentOnTask=Allow user comments on tasks AllowCommentOnTask=Allow user comments on tasks
AllowCommentOnProject=Allow user comments on projects AllowCommentOnProject=Allow user comments on projects

View File

@@ -85,16 +85,14 @@ $morehtml .= '<option name="mine" value="'.$user->id.'"'.(($search_project_user
$morehtml .= '</SELECT>'; $morehtml .= '</SELECT>';
$morehtml .= '<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">'; $morehtml .= '<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">';
print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml); if ($mine) $tooltiphelp = $langs->trans("MyTasksDesc");
//print load_fiche_titre($title, '', 'project');
if ($mine) print $langs->trans("MyTasksDesc").'<br><br>';
else else
{ {
if ($user->rights->projet->all->lire && !$socid) print $langs->trans("TasksDesc").'<br><br>'; if ($user->rights->projet->all->lire && !$socid) $tooltiphelp = $langs->trans("TasksDesc");
else print $langs->trans("TasksPublicDesc").'<br><br>'; else $tooltiphelp = $langs->trans("TasksPublicDesc");
} }
print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml);
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';

View File

@@ -486,11 +486,11 @@ dol_fiche_end();
print '<div class="floatright right'.($conf->dol_optimize_smallscreen ? ' centpercent' : '').'">'.$nav.'</div>'; // We move this before the assign to components so, the default submit button is not the assign to. print '<div class="floatright right'.($conf->dol_optimize_smallscreen ? ' centpercent' : '').'">'.$nav.'</div>'; // We move this before the assign to components so, the default submit button is not the assign to.
print '<div class="colorback float valignmiddle">'; print '<div class="colorbacktimesheet float valignmiddle">';
$titleassigntask = $langs->transnoentities("AssignTaskToMe"); $titleassigntask = $langs->transnoentities("AssignTaskToMe");
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs)); if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
print '<div class="taskiddiv inline-block">'; print '<div class="taskiddiv inline-block">';
$formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, 1, 1, 0, 0, '', '', 'all', $usertoprocess); $formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1, 0, 0, '', '', 'all', $usertoprocess);
print '</div>'; print '</div>';
print ' '; print ' ';
print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid', 0, 'maxwidth150onsmartphone'); print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid', 0, 'maxwidth150onsmartphone');

View File

@@ -410,11 +410,11 @@ dol_fiche_end();
print '<div class="floatright right'.($conf->dol_optimize_smallscreen?' centpercent':'').'">'.$nav.'</div>'; // We move this before the assign to components so, the default submit button is not the assign to. print '<div class="floatright right'.($conf->dol_optimize_smallscreen?' centpercent':'').'">'.$nav.'</div>'; // We move this before the assign to components so, the default submit button is not the assign to.
print '<div class="colorback float valignmiddle">'; print '<div class="colorbacktimesheet float valignmiddle">';
$titleassigntask = $langs->transnoentities("AssignTaskToMe"); $titleassigntask = $langs->transnoentities("AssignTaskToMe");
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs)); if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
print '<div class="taskiddiv inline-block">'; print '<div class="taskiddiv inline-block">';
$formproject->selectTasks($socid?$socid:-1, $taskid, 'taskid', 32, 0, 1, 1); $formproject->selectTasks($socid?$socid:-1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1);
print '</div>'; print '</div>';
print ' '; print ' ';
print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid', 0, 'maxwidth150onsmartphone'); print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid', 0, 'maxwidth150onsmartphone');

View File

@@ -503,11 +503,11 @@ dol_fiche_end();
print '<div class="floatright right'.($conf->dol_optimize_smallscreen ? ' centpercent' : '').'">'.$nav.'</div>'; // We move this before the assign to components so, the default submit button is not the assign to. print '<div class="floatright right'.($conf->dol_optimize_smallscreen ? ' centpercent' : '').'">'.$nav.'</div>'; // We move this before the assign to components so, the default submit button is not the assign to.
print '<div class="colorback float valignmiddle">'; print '<div class="colorbacktimesheet float valignmiddle">';
$titleassigntask = $langs->transnoentities("AssignTaskToMe"); $titleassigntask = $langs->transnoentities("AssignTaskToMe");
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs)); if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
print '<div class="taskiddiv inline-block">'; print '<div class="taskiddiv inline-block">';
$formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, 1, 1, 0, 0, '', '', 'all', $usertoprocess); $formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1, 0, 0, '', '', 'all', $usertoprocess);
print '</div>'; print '</div>';
print ' '; print ' ';
print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid', 0, 'maxwidth150onsmartphone'); print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid', 0, 'maxwidth150onsmartphone');

View File

@@ -28,20 +28,16 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
if ($obj) if ($obj)
{
//if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1))
{ {
$valsnb[$obj->opp_status] = $obj->nb; $valsnb[$obj->opp_status] = $obj->nb;
$valsamount[$obj->opp_status] = $obj->opp_amount; $valsamount[$obj->opp_status] = $obj->opp_amount;
$totalnb += $obj->nb; $totalnb += $obj->nb;
if ($obj->opp_status) $totaloppnb += $obj->nb; if ($obj->opp_status) $totaloppnb += $obj->nb;
if (!in_array($obj->code, array('WON', 'LOST'))) if (!in_array($obj->code, array('WON', 'LOST'))) {
{
$totalamount += $obj->opp_amount; $totalamount += $obj->opp_amount;
$ponderated_opp_amount += $obj->ponderated_opp_amount; $ponderated_opp_amount += $obj->ponderated_opp_amount;
} }
} $total += $obj->nb;
$total += $row[0];
} }
$i++; $i++;
} }

View File

@@ -88,17 +88,15 @@ $morehtml.='</SELECT>';
$morehtml.='<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">'; $morehtml.='<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">';
$morehtml.='</form>'; $morehtml.='</form>';
print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml); if ($mine) $tooltiphelp = $langs->trans("MyProjectsDesc");
// Show description of content
print '<div class="opacitymedium">';
if ($mine) print $langs->trans("MyProjectsDesc").'<br><br>';
else else
{ {
if (!empty($user->rights->projet->all->lire) && !$socid) print $langs->trans("ProjectsDesc").'<br><br>'; if (!empty($user->rights->projet->all->lire) && !$socid) $tooltiphelp = $langs->trans("ProjectsDesc");
else print $langs->trans("ProjectsPublicDesc").'<br><br>'; else $tooltiphelp = $langs->trans("ProjectsPublicDesc");
} }
print '</div>';
print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml);
// Get list of ponderated percent for each status // Get list of ponderated percent for each status
$listofoppstatus = array(); $listofopplabel = array(); $listofoppcode = array(); $listofoppstatus = array(); $listofopplabel = array(); $listofoppcode = array();

View File

@@ -408,7 +408,8 @@ hr { border: 0; border-top: 1px solid #ccc; }
margin-right: 5px; margin-right: 5px;
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
display: inline-block; display: inline-block;
padding: 4px 14px; padding: 8px 15px;
min-width: 90px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
text-decoration: none !important; text-decoration: none !important;
@@ -4995,6 +4996,10 @@ div.dataTables_length select {
/* Select2 */ /* Select2 */
/* ============================================================================== */ /* ============================================================================== */
span#select2-taskid-container[title^='--'] {
opacity: 0.3;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] { .select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: rgb(<?php echo $colorbackhmenu1 ?>); background-color: rgb(<?php echo $colorbackhmenu1 ?>);
color: #<?php echo $colortextbackhmenu; ?>; color: #<?php echo $colortextbackhmenu; ?>;

View File

@@ -4985,6 +4985,10 @@ div.dataTables_length select {
/* Select2 */ /* Select2 */
/* ============================================================================== */ /* ============================================================================== */
span#select2-taskid-container[title^='--'] {
opacity: 0.3;
}
input.select2-input { input.select2-input {
border-bottom: none ! important; border-bottom: none ! important;
} }