Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
e1c54664d1
@ -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;
|
||||
|
||||
|
||||
@ -212,7 +213,7 @@ if ($resql)
|
||||
|
||||
$htmlbuttonadd = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("Addanaccount") . '</a>';
|
||||
|
||||
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") . " : ";
|
||||
|
||||
@ -63,7 +63,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
{
|
||||
if (! $cancel) {
|
||||
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
|
||||
|
||||
|
||||
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
|
||||
$result = $db->query($sql);
|
||||
$obj = $db->fetch_object($result);
|
||||
@ -172,16 +172,16 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
}
|
||||
} else if ($action == 'delete' && $user->rights->accounting->chartofaccount) {
|
||||
$result = $object->fetch($id);
|
||||
|
||||
|
||||
if (! empty($object->id)) {
|
||||
$result = $object->delete($user);
|
||||
|
||||
|
||||
if ($result > 0) {
|
||||
header("Location: account.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
@ -270,7 +270,7 @@ if ($action == 'create') {
|
||||
$head = accounting_prepare_head($object);
|
||||
|
||||
// Edit mode
|
||||
if ($action == 'update')
|
||||
if ($action == 'update')
|
||||
{
|
||||
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
|
||||
|
||||
@ -327,7 +327,7 @@ if ($action == 'create') {
|
||||
print '</form>';
|
||||
} else {
|
||||
// View mode
|
||||
$linkback = '<a href="../admin/account.php">' . $langs->trans("BackToChartofaccounts") . '</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
// Category
|
||||
print '<tr><td>' . $langs->trans("AccountingCategory") . '</td>';
|
||||
print '<tr><td class="titlefield">' . $langs->trans("AccountingCategory") . '</td>';
|
||||
print '<td>';
|
||||
$formaccounting->select_accounting_category($cat_id, 'account_category', 1, 0, 0, 1);
|
||||
print '<input class="button" type="submit" value="' . $langs->trans("Select") . '">';
|
||||
@ -110,14 +110,26 @@ if (! empty($cat_id))
|
||||
if ($return < 0) {
|
||||
setEventMessages(null, $accountingcategory->errors, 'errors');
|
||||
}
|
||||
print '<tr><td>' . $langs->trans("AddAccountFromBookKeepingWithNoCategories") . '</td>';
|
||||
print '<tr><td class="tdtop">' . $langs->trans("AddAccountFromBookKeepingWithNoCategories") . '</td>';
|
||||
print '<td>';
|
||||
|
||||
$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 '<select class="flat minwidth200" size="' . count($obj) . '" name="cpt_bk[]" multiple>';
|
||||
|
||||
print $form->multiselectarray('cpt_bk', $arraykeyvalue, GETPOST('cpt_bk', 'array'), null, null, null, null, "90%");
|
||||
print '<br>';
|
||||
/*print '<select class="flat minwidth200" size="8" name="cpt_bk[]" multiple>';
|
||||
foreach ( $accountingcategory->lines_cptbk as $cpt ) {
|
||||
print '<option value="' . length_accountg($cpt->numero_compte) . '">' . length_accountg($cpt->numero_compte) . ' (' . $cpt->label_compte . ' ' . $cpt->doc_ref . ')</option>';
|
||||
}
|
||||
print '</select><br>';
|
||||
print ajax_combobox('cpt_bk');
|
||||
*/
|
||||
print '<input class="button" type="submit" id="" class="action-delete" value="' . $langs->trans("Add") . '"> ';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@ -201,9 +201,10 @@ function journalHead($nom,$variante,$period,$periodlink,$description,$builddate,
|
||||
$head[$h][1] = $langs->trans("Journalization");
|
||||
$head[$h][2] = 'journal';
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].$varlink.'">';
|
||||
|
||||
dol_fiche_head($head, 'journal');
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].$varlink.'">';
|
||||
foreach($moreparam as $key => $value)
|
||||
{
|
||||
print '<input type="hidden" name="'.$key.'" value="'.$value.'">';
|
||||
@ -251,12 +252,12 @@ function journalHead($nom,$variante,$period,$periodlink,$description,$builddate,
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center"><input type="submit" class="button" name="submit" value="'.$langs->trans("Refresh").'"></div>';
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" name="submit" value="'.$langs->trans("Refresh").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print "\n<!-- fin cartouche journal -->\n\n";
|
||||
}
|
||||
|
||||
|
||||
@ -3595,7 +3595,9 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><span '.(($conf->dol_use_jmobile != 4)?'class="active"':'').'>'.($page+1)."</li>";
|
||||
}
|
||||
}
|
||||
|
||||
print_fleche_navigation($page, $file, $options, $nextpage, $pagelist, $morehtml, $savlimit, $totalnboflines, $hideselectlimit); // output the div and ul for previous/last completed with page numbers into $pagelist
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '</tr></table>'."\n";
|
||||
|
||||
@ -219,7 +219,7 @@ ChangeBinding=Change the binding
|
||||
|
||||
## Admin
|
||||
ApplyMassCategories=Apply mass categories
|
||||
AddAccountFromBookKeepingWithNoCategories=Add acccount already used with no categories
|
||||
AddAccountFromBookKeepingWithNoCategories=Available acccount not yet in a personalized group
|
||||
CategoryDeleted=Category for the accounting account has been removed
|
||||
AccountingJournals=Accounting journals
|
||||
AccountingJournal=Accounting journal
|
||||
|
||||
Loading…
Reference in New Issue
Block a user