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 '<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
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";
// 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 '<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 '<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";
// 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
print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
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');
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 '</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 '</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 '</td></tr>'."\n";
// 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 '</td></tr>'."\n";
// 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";
// 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 '</td></tr>';

View File

@@ -695,26 +695,24 @@ print "</table>";
print '<br>';
print '<table class="noborder centpercent">';
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 "</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 '<td colspan="2">';
print "<table>";
print "<tr><td><label for=\"use_vat\">".$langs->trans("VATIsUsedDesc")."</label></td></tr>";
if ($mysoc->country_code == 'FR') print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n";
print "</table>";
$tooltiphelp = '';
if ($mysoc->country_code == 'FR') $tooltiphelp = '<i>'.$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i>";
print "<label for=\"use_vat\">".$form->textwithpicto($langs->trans("VATIsUsedDesc"), $tooltiphelp)."</label>";
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 '<td colspan="2">';
print "<table>";
print "<tr><td><label for=\"no_vat\">".$langs->trans("VATIsNotUsedDesc")."</label></td></tr>";
if ($mysoc->country_code == 'FR') print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n";
print "</table>";
$tooltiphelp = '';
if ($mysoc->country_code == 'FR') $tooltiphelp = "<i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i>\n";
print "<label for=\"no_vat\">".$form->textwithpicto($langs->trans("VATIsNotUsedDesc"), $tooltiphelp)."</label>";
print "</td></tr>\n";
print "</table>";
@@ -728,40 +726,35 @@ if ($mysoc->useLocalTax(1))
print '<br>';
print '<table class="noborder centpercent">';
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 "</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
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 '<table class="nobordernopadding">';
print "<tr><td><label for=\"lt1\">".$langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code)."</label></td></tr>";
$example = $langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code);
print ($example != "LocalTax1IsUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
print '<div class="nobordernopadding">';
$tooltiphelp = $langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code);
$tooltiphelp = ($tooltiphelp != "LocalTax1IsUsedExample" ? "<i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."</i>\n" : "");
print "<label for=\"lt1\">".$form->textwithpicto($langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code), $tooltiphelp)."</label>";
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");
print '</td></tr>';
}
$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 '</td></tr>';
print "</table>";
print "</div>";
print "</td></tr>\n";
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 "<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 '<td colspan="2">';
print "<table>";
print "<tr><td><label for=\"nolt1\">".$langs->transcountry("LocalTax1IsNotUsedDesc", $mysoc->country_code)."</label></td></tr>";
$example = $langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code);
print ($example != "LocalTax1IsNotUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
print "</table>";
$tooltiphelp = $langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code);
$tooltiphelp = ($tooltiphelp != "LocalTax1IsNotUsedExample" ? "<i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."</i>\n" : "");
print "<label for=\"nolt1\">".$form->textwithpicto($langs->transcountry("LocalTax1IsNotUsedDesc", $mysoc->country_code), $tooltiphelp)."</label>";
print "</td></tr>\n";
print "</table>";
}
@@ -771,38 +764,34 @@ if ($mysoc->useLocalTax(2))
print '<br>';
print '<table class="noborder centpercent">';
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 "</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
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 '<table class="nobordernopadding">';
print "<tr><td><label for=\"lt2\">".$langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code)."</label></td></tr>";
$example = $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" : "");
print '<div class="nobordernopadding">';
print "<label for=\"lt2\">".$langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code)."</label>";
$tooltiphelp = $langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code);
$tooltiphelp = ($tooltiphelp != "LocalTax2IsUsedExample" ? "<i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."</i>\n" : "");
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");
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 '</td></tr>';
print "</table>";
print "</div>";
print "</td></tr>\n";
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 "<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 '<td colspan="2">';
print "<table>";
print "<tr><td><label for=\"nolt2\">".$langs->transcountry("LocalTax2IsNotUsedDesc", $mysoc->country_code)."</label></td></tr>";
$example = $langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code);
print ($example != "LocalTax2IsNotUsedExample" ? "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."</i></td></tr>\n" : "");
print "</table>";
print "<div>";
$tooltiphelp = $langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code);
$tooltiphelp = ($tooltiphelp != "LocalTax2IsNotUsedExample" ? "<i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."</i>\n" : "");
print "<label for=\"nolt2\">".$form->textwithpicto($langs->transcountry("LocalTax2IsNotUsedDesc", $mysoc->country_code), $tooltiphelp)."</label>";
print "</div>";
print "</td></tr>\n";
print "</table>";
}

View File

@@ -207,7 +207,7 @@ llxHeader();
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 "<br>\n";

View File

@@ -207,29 +207,29 @@ if (empty($mysoc->country_code))
else
{
// Show examples
print '<b>'.$langs->trans("ExamplesWithCurrentSetup").":</b><br>\n";
print load_fiche_titre($langs->trans("ExamplesWithCurrentSetup"), '', '');
// Always show vat rates with 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);
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 " - ".$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;
$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 " - ".$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;
$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 " - ".$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
$vat_rates=array();
@@ -261,10 +261,10 @@ else
{
$s=10/3;
$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 " - ".$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;
$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 " - ".$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;
$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 " - ".$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

View File

@@ -375,7 +375,11 @@ class FormProjets
}
if (! empty($show_empty)) {
$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;';
$out.= '</option>';
}

View File

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

View File

@@ -240,6 +240,7 @@ LatestModifiedProjects=Latest %s modified projects
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)
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
AllowCommentOnTask=Allow user comments on tasks
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 .= '<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">';
print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml);
//print load_fiche_titre($title, '', 'project');
if ($mine) print $langs->trans("MyTasksDesc").'<br><br>';
if ($mine) $tooltiphelp = $langs->trans("MyTasksDesc");
else
{
if ($user->rights->projet->all->lire && !$socid) print $langs->trans("TasksDesc").'<br><br>';
else print $langs->trans("TasksPublicDesc").'<br><br>';
if ($user->rights->projet->all->lire && !$socid) $tooltiphelp = $langs->trans("TasksDesc");
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">';

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="colorback float valignmiddle">';
print '<div class="colorbacktimesheet float valignmiddle">';
$titleassigntask = $langs->transnoentities("AssignTaskToMe");
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
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 ' ';
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="colorback float valignmiddle">';
print '<div class="colorbacktimesheet float valignmiddle">';
$titleassigntask = $langs->transnoentities("AssignTaskToMe");
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
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 ' ';
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="colorback float valignmiddle">';
print '<div class="colorbacktimesheet float valignmiddle">';
$titleassigntask = $langs->transnoentities("AssignTaskToMe");
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
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 ' ';
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);
if ($obj)
{
//if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1))
{
$valsnb[$obj->opp_status] = $obj->nb;
$valsamount[$obj->opp_status] = $obj->opp_amount;
$totalnb += $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;
$ponderated_opp_amount += $obj->ponderated_opp_amount;
}
}
$total += $row[0];
$total += $obj->nb;
}
$i++;
}

View File

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

View File

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

View File

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