NEW Accountancy - Show subledger account in thirdparty
This commit is contained in:
parent
c6a7d8cef1
commit
c92e7c337f
3 changed files with 13 additions and 26 deletions
|
|
@ -52,7 +52,6 @@ $langs->loadLangs(array("accountancy", "compta"));
|
|||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$socid = GETPOSTINT('socid');
|
||||
$userid = GETPOSTINT('userid');
|
||||
$mode = (GETPOST('mode', 'alpha') ? GETPOST('mode', 'alpha') : 'customer'); // Only for tab view
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
|
@ -311,9 +310,6 @@ if (empty($reshook)) {
|
|||
if (!empty($socid)) {
|
||||
$param = '&socid='.$socid;
|
||||
}
|
||||
if (!empty($userid)) {
|
||||
$param = '&userid='.$userid;
|
||||
}
|
||||
|
||||
if (!empty($search_date_start)) {
|
||||
$filter['t.doc_date>='] = $search_date_start;
|
||||
|
|
@ -600,7 +596,7 @@ $title_page .= ')';
|
|||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double';
|
||||
llxHeader('', $title_page, $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-consultation page-'.(($type == 'sub') ? 'sub' : '').'ledger');
|
||||
|
||||
if (!empty($socid) || !empty($userid)) {
|
||||
if (!empty($socid)) {
|
||||
$companystatic = new Societe($db);
|
||||
$res = $companystatic->fetch($socid);
|
||||
if ($res > 0) {
|
||||
|
|
@ -611,7 +607,9 @@ if (!empty($socid) || !empty($userid)) {
|
|||
|
||||
print dol_get_fiche_head($head, 'accounting', $langs->trans("ThirdParty"), -1, 'company');
|
||||
|
||||
dol_banner_tab($companystatic, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom');
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($companystatic, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
|
|
@ -652,6 +650,8 @@ if (!empty($socid) || !empty($userid)) {
|
|||
print '</div>';
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print info_admin($langs->trans("WarningThisPageContainsOnlyEntriesTransferredInAccounting"));
|
||||
|
||||
// Choice of mode (customer / supplier / employee)
|
||||
if (!empty($conf->dol_use_jmobile)) {
|
||||
print "\n".'<div class="fichecenter"><div class="nowrap">'."\n";
|
||||
|
|
@ -696,20 +696,6 @@ if (!empty($socid) || !empty($userid)) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($userid) && !empty($userstatic->code_compta_user)) {
|
||||
if ($mode != 'employee') {
|
||||
print '<a class="a-mesure-disabled marginleftonly marginrightonly reposition" href="' . $_SERVER["PHP_SELF"] . '?mode=user' . $param . '">';
|
||||
} else {
|
||||
print '<span class="a-mesure marginleftonly marginrightonly">';
|
||||
}
|
||||
print $langs->trans("UserAccountancyCodeShort");
|
||||
if ($mode != 'employee') {
|
||||
print '</a>';
|
||||
} else {
|
||||
print '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($conf->dol_use_jmobile)) {
|
||||
print '</div></div>';
|
||||
} else {
|
||||
|
|
@ -786,9 +772,6 @@ print '<input type="hidden" name="type" value="'.$type.'">';
|
|||
if (!empty($socid)) {
|
||||
print '<input type="hidden" name="socid" value="' . $socid . '">';
|
||||
}
|
||||
if (!empty($userid)) {
|
||||
print '<input type="hidden" name="userid" value="' . $userid . '">';
|
||||
}
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
|
@ -803,7 +786,7 @@ $newcardbutton = empty($hookmanager->resPrint) ? '' : $hookmanager->resPrint;
|
|||
|
||||
if (empty($reshook)) {
|
||||
// Remove button navigation if in thirdparty tab mode
|
||||
if (empty($socid) && empty($userid)) {
|
||||
if (empty($socid)) {
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?' . $param);
|
||||
if ($type == 'sub') {
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?' . $url_param, '', 1, array('morecss' => 'marginleftonly'));
|
||||
|
|
|
|||
|
|
@ -145,13 +145,16 @@ function societe_prepare_head(Societe $object)
|
|||
// link to customer account by default
|
||||
if (!empty($object->code_compta_client)) {
|
||||
$subledger_start_account = $subledger_end_account = $object->code_compta_client;
|
||||
} else if (!empty($object->code_compta_fournisseur)) {
|
||||
$mode = 'customer';
|
||||
} elseif (!empty($object->code_compta_fournisseur)) {
|
||||
$subledger_start_account = $subledger_end_account = $object->code_compta_fournisseur;
|
||||
$mode = 'supplier';
|
||||
} else {
|
||||
$subledger_start_account = $subledger_end_account = '';
|
||||
$mode = 'customer';
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?socid='.$object->id.'&type=sub&search_accountancy_code_start='.$subledger_start_account.'&search_accountancy_code_end='.$subledger_end_account;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?socid='.$object->id.'&mode='.$mode.'&type=sub&search_accountancy_code_start='.$subledger_start_account.'&search_accountancy_code_end='.$subledger_end_account;
|
||||
$head[$h][1] = $langs->trans("Accounting");
|
||||
$head[$h][2] = 'accounting';
|
||||
$h++;
|
||||
|
|
|
|||
|
|
@ -313,6 +313,7 @@ ClickOnUseTutorialForHelp=Welcome on the section to generate your accountancy. C
|
|||
NotReconciled=Not reconciled
|
||||
WarningRecordWithoutSubledgerAreExcluded=Warning, all lines without subledger account defined are filtered and excluded from this view
|
||||
AccountRemovedFromCurrentChartOfAccount=Accounting account that does not exist in the current chart of accounts
|
||||
WarningThisPageContainsOnlyEntriesTransferredInAccounting=Warning, this page only contains entries transferred to the accounting system.
|
||||
## Admin
|
||||
BindingOptions=Options for the transfer in accountancy
|
||||
ApplyMassCategories=Apply mass categories
|
||||
|
|
|
|||
Loading…
Reference in a new issue