Skip to content
Snippets Groups Projects
Commit a7b21db2 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix code is not mandatory on vat table

parent 0c456add
No related branches found
No related tags found
No related merge requests found
......@@ -596,7 +596,9 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($value == 'color' && empty($_POST['color'])) continue;
if ($value == 'formula' && empty($_POST['formula'])) continue;
if ((! isset($_POST[$value]) || $_POST[$value]=='')
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy'))) // Fields that are not mandatory
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy')) // Fields that are not mandatory
&& (! ($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10
)
)
{
$ok=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment