Fix: Warning if setup not complete
This commit is contained in:
parent
df43d477fc
commit
815f43904d
@ -168,6 +168,15 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (empty($mysoc->country_code))
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
$warnpicto=img_error($langs->trans("WarningMandatorySetupNotComplete"));
|
||||||
|
print '<br><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
// Show examples
|
// Show examples
|
||||||
print '<b>'.$langs->trans("ExamplesWithCurrentSetup").":</b><br>\n";
|
print '<b>'.$langs->trans("ExamplesWithCurrentSetup").":</b><br>\n";
|
||||||
|
|
||||||
@ -193,6 +202,7 @@ print " x ".$langs->trans("Quantity").": ".$qty;
|
|||||||
print " - ".$langs->trans("VAT").": ".$vat.'%';
|
print " - ".$langs->trans("VAT").": ".$vat.'%';
|
||||||
print " -> ".$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n";
|
print " -> ".$langs->trans("TotalPriceAfterRounding").": ".$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();
|
||||||
|
|
||||||
@ -300,6 +310,8 @@ foreach($vat_rates as $vat)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO We must add a confirmation on button because this will make a mass change
|
// TODO We must add a confirmation on button because this will make a mass change
|
||||||
// TODO Should also change table product_price for price levels
|
// FIXME Should also change table product_price for price levels
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
@ -128,6 +128,8 @@ if ($action == 'convert')
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form=new Form($db);
|
||||||
|
|
||||||
$title = $langs->trans('ModulesSystemTools');
|
$title = $langs->trans('ModulesSystemTools');
|
||||||
|
|
||||||
llxHeader('',$title);
|
llxHeader('',$title);
|
||||||
@ -136,7 +138,15 @@ print_fiche_titre($title,'','setup');
|
|||||||
|
|
||||||
print $langs->trans("ProductVatMassChangeDesc").'<br><br>';
|
print $langs->trans("ProductVatMassChangeDesc").'<br><br>';
|
||||||
|
|
||||||
$form=new Form($db);
|
if (empty($mysoc->country_code))
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
$warnpicto=img_error($langs->trans("WarningMandatorySetupNotComplete"));
|
||||||
|
print '<br><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
@ -184,7 +194,7 @@ print '<input type="submit" id="convert_vatrate" name="convert_vatrate" value="'
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user