Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
86d39b435b
@ -156,17 +156,8 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
|
||||
$ok=1;
|
||||
foreach ($listfield as $f => $value)
|
||||
{
|
||||
if ($value == 'country_id' && in_array($tablib[$id], array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType','DictionaryHolidayTypes','DictionaryRevenueStamp','DictionaryAccountancyCategory','Pcg_version'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'country' && in_array($tablib[$id], array('DictionaryCanton','DictionaryCompanyType','DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue;
|
||||
if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue;
|
||||
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
|
||||
&& (! ($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10
|
||||
)
|
||||
)
|
||||
if ($value == 'country_id' && in_array($tablib[$id], array('Pcg_version'))) continue; // For some pages, country is not mandatory
|
||||
if ((! isset($_POST[$value]) || $_POST[$value]==''))
|
||||
{
|
||||
$ok=0;
|
||||
$fieldnamekey=$listfield[$f];
|
||||
@ -174,19 +165,6 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
|
||||
|
||||
if ($fieldnamekey == 'pcg_version') $fieldnamekey='Pcg_version';
|
||||
if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey='Label';
|
||||
if ($fieldnamekey == 'libelle_facture') $fieldnamekey = 'LabelOnDocuments';
|
||||
if ($fieldnamekey == 'nbjour') $fieldnamekey='NbOfDays';
|
||||
if ($fieldnamekey == 'decalage') $fieldnamekey='Offset';
|
||||
if ($fieldnamekey == 'module') $fieldnamekey='Module';
|
||||
if ($fieldnamekey == 'code') $fieldnamekey = 'Code';
|
||||
if ($fieldnamekey == 'note') $fieldnamekey = 'Note';
|
||||
if ($fieldnamekey == 'taux') $fieldnamekey = 'Rate';
|
||||
if ($fieldnamekey == 'type') $fieldnamekey = 'Type';
|
||||
if ($fieldnamekey == 'position') $fieldnamekey = 'Position';
|
||||
if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode';
|
||||
if ($fieldnamekey == 'deductible') $fieldnamekey = 'Deductible';
|
||||
if ($fieldnamekey == 'sortorder') $fieldnamekey = 'SortOrder';
|
||||
if ($fieldnamekey == 'category_type') $fieldnamekey = 'Calculated';
|
||||
|
||||
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
|
||||
}
|
||||
@ -196,9 +174,9 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
|
||||
$ok=0;
|
||||
setEventMessages($langs->transnoentities('ErrorReservedTypeSystemSystemAuto'), null, 'errors');
|
||||
}
|
||||
if (isset($_POST["code"]))
|
||||
if (isset($_POST["pcg_version"]))
|
||||
{
|
||||
if ($_POST["code"]=='0')
|
||||
if ($_POST["pcg_version"]=='0')
|
||||
{
|
||||
$ok=0;
|
||||
setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors');
|
||||
@ -211,28 +189,9 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
|
||||
}
|
||||
if (isset($_POST["country"]) && ($_POST["country"]=='0') && ($id != 2))
|
||||
{
|
||||
if (in_array($tablib[$id], array('DictionaryCompanyType','DictionaryHolidayTypes'))) // Field country is no mandatory for such dictionaries
|
||||
{
|
||||
$_POST["country"]='';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ok=0;
|
||||
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("Country")), null, 'errors');
|
||||
}
|
||||
$ok=0;
|
||||
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("Country")), null, 'errors');
|
||||
}
|
||||
if (! is_numeric($_POST["code"]))
|
||||
{
|
||||
$ok=0;
|
||||
setEventMessages($langs->transnoentities("ErrorFieldMustBeANumeric", $langs->transnoentities("Code")), null, 'errors');
|
||||
}
|
||||
|
||||
// Clean some parameters
|
||||
if (isset($_POST["localtax1"]) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0
|
||||
if (isset($_POST["localtax2"]) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0
|
||||
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"]=''; // If empty, we force to null
|
||||
if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"]=''; // If empty, we force to null
|
||||
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
if ($ok && GETPOST('actionadd', 'alpha'))
|
||||
|
||||
@ -1058,7 +1058,7 @@ if ($id)
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
$class='';
|
||||
|
||||
if ($fieldlist[$field]=='pos') { $valuetoshow=$langs->trans("Position"); $class='width100'; }
|
||||
if ($fieldlist[$field]=='pos') { $valuetoshow=$langs->trans("Position"); $class='maxwidth100'; }
|
||||
if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); }
|
||||
if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); }
|
||||
if ($fieldlist[$field]=='taux') {
|
||||
@ -1076,7 +1076,7 @@ if ($id)
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"), $langs->trans("TypePaymentDesc"), 2, 1, img_help(1, ''));
|
||||
else $valuetoshow=$langs->trans("Type");
|
||||
}
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); $class='width100'; }
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); $class='maxwidth100'; }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
$valuetoshow=$form->textwithtooltip($langs->trans("Label"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, ''));
|
||||
@ -1602,7 +1602,7 @@ if ($id)
|
||||
$class='tddict';
|
||||
if ($fieldlist[$field] == 'note' && $id == 10) $class.=' tdoverflowmax200';
|
||||
if ($fieldlist[$field] == 'tracking') $class.=' tdoverflowauto';
|
||||
if ($fieldlist[$field] == 'code') $class.=' width100';
|
||||
if ($fieldlist[$field] == 'code') $class.=' maxwidth100';
|
||||
if ($fieldlist[$field] == 'position') $class.=' right';
|
||||
if ($fieldlist[$field] == 'localtax1_type') $class.=' nowrap';
|
||||
if ($fieldlist[$field] == 'localtax2_type') $class.=' nowrap';
|
||||
@ -1981,7 +1981,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
}
|
||||
|
||||
$classtd=''; $class='';
|
||||
if ($fieldlist[$field]=='code') $classtd='width100';
|
||||
if ($fieldlist[$field]=='code') $classtd='maxwidth100';
|
||||
if (in_array($fieldlist[$field], array('pos', 'use_default', 'affect', 'delay', 'position', 'sortorder', 'sens', 'category_type'))) $class='maxwidth50';
|
||||
if (in_array($fieldlist[$field], array('libelle', 'label', 'tracking'))) $class='quatrevingtpercent';
|
||||
print '<td class="'.$classtd.'">';
|
||||
|
||||
@ -128,12 +128,6 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (11
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1162, 116, '7','0','VAT reduced rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1163, 116, '0','0','VAT rate 0',1);
|
||||
|
||||
-- ITALY (id country=3)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 31, 3, '22','0','VAT standard rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 32, 3, '10','0','VAT reduced rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 33, 3, '4','0','VAT super-reduced rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 34, 3, '0','0','VAT Rate 0',1);
|
||||
|
||||
-- INDIA (id country=117)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1171, 117, '0','0','VAT Rate 0', 0);
|
||||
|
||||
@ -153,6 +147,12 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 8
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 84, 8, '9','0','VAT reduced rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 85, 8, '4.8','0','VAT reduced rate',1);
|
||||
|
||||
-- ITALY (id country=3)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 31, 3, '22','0','VAT standard rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 32, 3, '10','0','VAT reduced rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 33, 3, '4','0','VAT super-reduced rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 34, 3, '0','0','VAT Rate 0',1);
|
||||
|
||||
-- IVORY COST (id country=21)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values (211, 21, '0','0',0,0,0,0,'IVA Rate 0',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values (212, 21, '18','0',7.5,2,0,0,'IVA standard rate',1);
|
||||
|
||||
@ -1927,12 +1927,6 @@ SmallerThan=Smaller than
|
||||
LargerThan=Larger than
|
||||
IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects.
|
||||
WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/.
|
||||
IFTTTSetup=IFTTT module setup
|
||||
IFTTT_SERVICE_KEY=IFTTT Service key
|
||||
IFTTT_DOLIBARR_ENDPOINT_SECUREKEY=Security key to secure the endpoint URL used by IFTTT to send messages to your Dolibarr.
|
||||
IFTTTDesc=This module is designed to trigger events on IFTTT and/or to execute some action on external IFTTT triggers.
|
||||
UrlForIFTTT=URL endpoint for IFTTT
|
||||
YouWillFindItOnYourIFTTTAccount=You will find it on your IFTTT account
|
||||
EndPointFor=End point for %s : %s
|
||||
DeleteEmailCollector=Delete email collector
|
||||
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
|
||||
|
||||
Loading…
Reference in New Issue
Block a user