diff --git a/ChangeLog b/ChangeLog
index 494050efbfc..144f39a574b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,11 @@ English Dolibarr ChangeLog
***** ChangeLog for 7.0.0 compared to 6.0.* *****
+WARNING:
+
+Following changes may create regression for some external modules, but were necessary to make Dolibarr better:
+* The methode "cloture" on contact were renamed into "closeAll".
+
***** ChangeLog for 6.0.0 compared to 5.0.* *****
@@ -14,7 +19,7 @@ NEW: Add a payment module for Stripe.
NEW: Add module "Product variant" (like red, blue for the product shoes)
NEW: Accountancy - Activate multi-journal & Add journal_label to database (FEC)
NEW: Add a tracking id into mass emailing.
-NEW: Tax system more compatible with the new tax roollout in India (IGST / CGST / SGST).
+NEW: Tax system more compatible with the new tax rollout in India (IGST / CGST / SGST).
NEW: Add calculation function for Loan schedule
NEW: Add "depends on" and "required by" into module informations
NEW: Add hidden option THIRDPARTY_INCLUDE_PARENT_IN_LINKTO
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index 1843f3c8cfd..80cc9b0856c 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -334,7 +334,7 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
}
foreach my $target (sort keys %CHOOSEDPUBLISH) {
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
- if ($target eq 'ASSO') { $nbofpublishneedchangelog++; $nbofpublishneedtag++; }
+ if ($target eq 'ASSO') { $nbofpublishneedchangelog++; }
if ($target eq 'SF') { $nbofpublishneedchangelog++; $nbofpublishneedtag++; }
$nboftargetok++;
}
diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec
index 04a3138d9f9..3c8a5097c0e 100755
--- a/build/rpm/dolibarr_mandriva.spec
+++ b/build/rpm/dolibarr_mandriva.spec
@@ -163,6 +163,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories
+%_datadir/dolibarr/htdocs/collab
%_datadir/dolibarr/htdocs/comm
%_datadir/dolibarr/htdocs/commande
%_datadir/dolibarr/htdocs/compta
diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php
index 905fd8b97ef..acd9eba2c9d 100644
--- a/htdocs/accountancy/admin/account.php
+++ b/htdocs/accountancy/admin/account.php
@@ -69,8 +69,8 @@ $arrayfields=array(
'aa.account_number'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1),
'aa.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
'aa.account_parent'=>array('label'=>$langs->trans("Accountparent"), 'checked'=>0),
- 'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>0),
- 'aa.pcg_subtype'=>array('label'=>$langs->trans("Pcgsubtype"), 'checked'=>0),
+ 'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>0, 'help'=>'PcgtypeDesc'),
+ 'aa.pcg_subtype'=>array('label'=>$langs->trans("Pcgsubtype"), 'checked'=>0, 'help'=>'PcgtypeDesc'),
'aa.active'=>array('label'=>$langs->trans("Activated"), 'checked'=>1)
);
@@ -94,9 +94,9 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
if (empty($reshook))
{
if (! empty($cancel)) $action = '';
-
+
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
-
+
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') ||GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
{
$search_account = "";
@@ -106,13 +106,13 @@ if (empty($reshook))
$search_pcgsubtype = "";
$search_array_options=array();
}
-
+
if (GETPOST('change_chart'))
{
$chartofaccounts = GETPOST('chartofaccounts', 'int');
-
+
if (! empty($chartofaccounts)) {
-
+
if (! dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
@@ -120,12 +120,12 @@ if (empty($reshook))
$error ++;
}
}
-
+
if ($action == 'disable') {
if ($accounting->fetch($id)) {
$result = $accounting->account_desactivate($id);
}
-
+
$action = 'update';
if ($result < 0) {
setEventMessages($accounting->error, $accounting->errors, 'errors');
@@ -179,7 +179,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$resql = $db->query($sql);
$nbtotalofrecords = $db->num_rows($resql);
-}
+}
$sql .= $db->plimit($limit + 1, $offset);
@@ -190,13 +190,14 @@ if ($resql)
{
$num = $db->num_rows($resql);
- $params='';
+ $param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
- if ($search_account) $params.= '&search_account='.urlencode($search_account);
- if ($search_label) $params.= '&search_label='.urlencode($search_label);
- if ($search_accountparent) $params.= '&search_accountparent='.urlencode($search_accountparent);
- if ($search_pcgtype) $params.= '&search_pcgtype='.urlencode($search_pcgtype);
- if ($search_pcgsubtype) $params.= '&search_pcgsubtype='.urlencode($search_pcgsubtype);
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if ($search_account) $param.= '&search_account='.urlencode($search_account);
+ if ($search_label) $param.= '&search_label='.urlencode($search_label);
+ if ($search_accountparent) $param.= '&search_accountparent='.urlencode($search_accountparent);
+ if ($search_pcgtype) $param.= '&search_pcgtype='.urlencode($search_pcgtype);
+ if ($search_pcgsubtype) $param.= '&search_pcgsubtype='.urlencode($search_pcgsubtype);
if ($optioncss != '') $param.='&optioncss='.$optioncss;
@@ -209,11 +210,11 @@ if ($resql)
print '';
print '';
print '';
-
+
$htmlbuttonadd = '' . $langs->trans("Addanaccount") . '';
-
- print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd);
-
+
+ print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd, '', $limit);
+
// Box to select active chart of account
print $langs->trans("Selectchartofaccounts") . " : ";
print '";
print '';
- print '
';
+ print '
';
print '
';
-
+
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
-
+
print '
| "; print $accountparent->getNomUrl(1); print " | \n"; @@ -371,11 +372,11 @@ if ($resql) } print '' . "\n"; if (! $i) $totalarray['nbfield']++; - + print "
| ' . $langs->trans("AccountingCategory") . ' | '; +print '|||||||||||
| ' . $langs->trans("AccountingCategory") . ' | '; print ''; $formaccounting->select_accounting_category($cat_id, 'account_category', 1, 0, 0, 1); print ''; @@ -110,14 +110,26 @@ if (! empty($cat_id)) if ($return < 0) { setEventMessages(null, $accountingcategory->errors, 'errors'); } - print ' | ||||||||||
| ' . $langs->trans("AddAccountFromBookKeepingWithNoCategories") . ' | '; + print '|||||||||||
| ' . $langs->trans("AddAccountFromBookKeepingWithNoCategories") . ' | '; print ''; + + $arraykeyvalue=array(); + foreach($accountingcategory->lines_cptbk as $key => $val) + { + $arraykeyvalue[length_accountg($val->numero_compte)] = length_accountg($val->numero_compte) . ' (' . $val->label_compte . ($val->doc_ref?' '.$val->doc_ref:'').')'; + } + if (is_array($accountingcategory->lines_cptbk) && count($accountingcategory->lines_cptbk) > 0) { - print ' | ||||||||||
| '; continue; } // For region page, we do not show the country input $valuetoshow=$langs->trans("Country"); } - if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; } if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); } if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); } if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); } if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); } - if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); } - if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Direction"); } + if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Comment"); } if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); } if ($valuetoshow != '') @@ -617,8 +587,7 @@ if ($id) $paramwithsearch = $param; if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder; if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield; - if (GETPOST('from')) $paramwithsearch.= '&from='.GETPOST('from','alpha'); - + if (GETPOST('from','alpha')) $paramwithsearch.= '&from='.GETPOST('from','alpha'); // There is several pages if ($num > $listlimit) { @@ -700,8 +669,7 @@ if ($id) if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); } if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); } if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); } - if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); } - if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Direction"); } + if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Comment"); } if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); } // Affiche nom du champ if ($showfield) @@ -742,6 +710,7 @@ if ($id) print ''; print ''; print ''; + print ' | '; } else { @@ -759,17 +728,9 @@ if ($id) $showfield=1; $align="left"; $valuetoshow=$obj->{$fieldlist[$field]}; - if ($value == 'type_template') + if ($value == 'category_type') { - $valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow; - } - if ($value == 'element') - { - $valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow; - } - else if ($value == 'source') - { - $valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow; + $valuetoshow = yn($valuetoshow); } else if ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); @@ -785,12 +746,6 @@ if ($id) $valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country); } } - else if ($fieldlist[$field]=='libelle_facture') { - $langs->load("bills"); - $key=$langs->trans("PaymentCondition".strtoupper($obj->code)); - $valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); - $valuetoshow=nl2br($valuetoshow); - } else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') { $key=$langs->trans("Country".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); @@ -804,83 +759,11 @@ if ($id) $key=$langs->trans("Action".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') { - $key=$langs->trans("Currency".strtoupper($obj->code_iso)); - $valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso)?$key:$obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') { - $key=$langs->trans(strtoupper($obj->code)); - $valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') { - $key=$langs->trans(strtoupper($obj->code)); - $valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') { - $key=$langs->trans("Civility".strtoupper($obj->code)); - $valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') { - $langs->load('agenda'); - $key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)); - $valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') { - $langs->load("bills"); - $key=$langs->trans("PaymentConditionShort".strtoupper($obj->code)); - $valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') { - $langs->load("bills"); - $key=$langs->trans("PaymentType".strtoupper($obj->code)); - $valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') { - $key=$langs->trans("DemandReasonType".strtoupper($obj->code)); - $valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') { - $langs->load("orders"); - $key=$langs->trans($obj->code); - $valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->{$fieldlist[$field]}; - } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') { - $langs->load("sendings"); - $key=$langs->trans("SendingMethod".strtoupper($obj->code)); - $valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format') - { - $key = $langs->trans('PaperFormat'.strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') - { - $langs->load('trips'); - $key = $langs->trans(strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } - else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { - $langs->load("products"); - $valuetoshow=$langs->trans($obj->{$fieldlist[$field]}); - } - else if ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { - $langs->load("products"); - $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); - } - else if (in_array($fieldlist[$field],array('recuperableonly'))) - { - $align="center"; - } - else if ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') { - $valuetoshow = length_accountg($valuetoshow); - } $class='tddict'; - if ($fieldlist[$field] == 'tracking') $class.=' tdoverflowauto'; // Show value for field if ($showfield) print ' | '.$valuetoshow.' | '; } @@ -891,14 +774,9 @@ if ($id) if (isset($obj->code)) { if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; } - else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } - else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } } - if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; } - if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { $canbedisabled=0; $canbedisabled = 0; } $canbemodified=$iserasable; - if ($obj->code == 'RECEP') $canbemodified=1; $url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):''); if ($param) $url .= '&'.$param; @@ -909,10 +787,7 @@ if ($id) if ($canbedisabled) print ''.$actl[$obj->active].''; else { - if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive"); - else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated"); - else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption"); - else print $langs->trans("AlwaysActive"); + print $langs->trans("AlwaysActive"); } print ""; @@ -937,8 +812,8 @@ if ($id) print ''.$langs->trans("Setup").''; } print ''; - print "\n"; } + print "\n"; $i++; } } @@ -948,6 +823,7 @@ if ($id) } print '
';
// List of files
$listofpaths=dol_dir_list($upload_dir,'all',0,'','','name',SORT_ASC,0);
+
// TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
$out.= ''."\n";
$out.= '';
if ($showform) print "| '.$langs->trans("SmsFrom");
+ print ' | '.$langs->trans("SmsFrom");
print '';
print " | ";
if ($this->fromtype == 'user')
@@ -223,7 +223,7 @@ function limitChars(textarea, limit, infodiv)
if (is_array($resultsender) && count($resultsender) > 0)
{
- print ' | ';
+ print ' | ';
//$moretext=$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients");
$moretext='';
print $form->textwithpicto($langs->trans("SmsTo"),$moretext);
@@ -259,7 +259,7 @@ function limitChars(textarea, limit, infodiv)
if (! empty($this->withtosocid) && $this->withtosocid > 0)
{
$liste=array();
- foreach ($soc->thirdparty_and_contact_phone_array() as $key=>$value)
+ foreach ($soc->thirdparty_and_contact_phone_array() as $key => $value)
{
$liste[$key]=$value;
}
@@ -285,7 +285,7 @@ function limitChars(textarea, limit, infodiv)
$defaultmessage=str_replace('\n',"\n",$defaultmessage);
print " | ".$langs->trans("SmsText")." | ";
+ print ''.$langs->trans("SmsText")." | ";
print "";
if ($this->withbodyreadonly)
{
@@ -306,7 +306,7 @@ function limitChars(textarea, limit, infodiv)
| | '.$langs->trans("Priority").' : |
- | '.$langs->trans("Type").' : |
- | '.$langs->trans("DisableStopIfSupported").' : |
+ | |
| '.$langs->trans("ReportName").' | '; - if (! $variantexxx) print ''; - else print ' | '; - print $nom; - if ($variantexxx) print ' | '.$variantexxx; + print ' | '; + print $reportname; print ' | '; + if ($variante) print ''; print ' | |||
| '.$langs->trans("CalculationMode").' | '; - if (! $variante) print ''; - else print ' | '; + print ' | '; print $calcmode; - if ($variante) print ' | '.$variante; + if ($variante) print ' | '; print ''; print ' | |||
| '.$langs->trans("ReportPeriod").' | '; - if (! $periodlink) print ''; - else print ' | '; + print ' | '; if ($period) print $period; - if ($periodlink) print ' | '.$periodlink; + if ($variante) print ' | '.$periodlink.' | '; print ''; print '|||
| '.$langs->trans("ReportDescription").' | '; - print ''.$description.' | '; + print ''.$description.' | '; + if ($variante) print ''; print ' | |||||
| '.$langs->trans("GeneratedOn").' | '; - if (! $exportlink) print ''; - else print ' | '; - print dol_print_date($builddate); - if ($exportlink) print ' | '.$langs->trans("Export").' | '.$exportlink; - print ' | '; + print dol_print_date($builddate, 'dayhour'); + print ' | '; + if ($variante) print ''.($exportlink ? $langs->trans("Export").': '.$exportlink : '').' | '; + print ''; print '||