Debug accountancy module. Page for bank journalization is still KO.
This commit is contained in:
parent
885a636351
commit
fc5f4007a1
@ -61,6 +61,8 @@ if ($page == -1) { $page = 0 ; }
|
|||||||
$offset = $listlimit * $page ;
|
$offset = $listlimit * $page ;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
if (empty($sortfield)) $sortfield='code';
|
||||||
|
if (empty($sortorder)) $sortorder='ASC';
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
@ -125,7 +127,8 @@ complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,
|
|||||||
|
|
||||||
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
|
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
|
||||||
$elementList = array();
|
$elementList = array();
|
||||||
$sourceList = array(
|
// Must match ids defined into eldy.lib.php
|
||||||
|
$sourceList = array(
|
||||||
'1' => $langs->trans('AccountingJournalType1'),
|
'1' => $langs->trans('AccountingJournalType1'),
|
||||||
'2' => $langs->trans('AccountingJournalType2'),
|
'2' => $langs->trans('AccountingJournalType2'),
|
||||||
'3' => $langs->trans('AccountingJournalType3'),
|
'3' => $langs->trans('AccountingJournalType3'),
|
||||||
|
|||||||
@ -1007,8 +1007,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
// Multi journal
|
// Multi journal
|
||||||
$sql = "SELECT rowid, code, label, nature";
|
$sql = "SELECT rowid, code, label, nature";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_journal";
|
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_journal";
|
||||||
// $sql.= " WHERE entity = ".$conf->entity;
|
$sql.= " WHERE entity = ".$conf->entity;
|
||||||
$sql.= " ORDER BY code";
|
$sql.= " ORDER BY nature";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -1022,13 +1022,24 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
if ($objp->nature == 1) $nature="sells";
|
$nature='';
|
||||||
if ($objp->nature == 2) $nature="purchases";
|
// Must match array $sourceList defined into journals_list.php
|
||||||
if ($objp->nature == 3) $nature="bank";
|
if ($objp->nature == 2) $nature="sells";
|
||||||
if ($objp->nature == 4) $nature="various";
|
if ($objp->nature == 3) $nature="purchases";
|
||||||
|
if ($objp->nature == 4) $nature="bank";
|
||||||
|
if ($objp->nature == 1) $nature="various";
|
||||||
if ($objp->nature == 9) $nature="hasnew";
|
if ($objp->nature == 9) $nature="hasnew";
|
||||||
|
|
||||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy/',$leftmenu)) $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&code_journal='.$objp->code,dol_trunc($objp->label,25),2,$user->rights->accounting->comptarapport->lire);
|
// To enable when page exists
|
||||||
|
if (empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||||
|
{
|
||||||
|
if ($nature == 'various' || $nature == 'hasnew') $nature='';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($nature)
|
||||||
|
{
|
||||||
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy/',$leftmenu)) $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&code_journal='.$objp->code,dol_trunc($objp->label,25),2,$user->rights->accounting->comptarapport->lire);
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,6 +120,8 @@ INSERT INTO llx_accounting_journal (rowid, code, label, nature, active) VALUES (
|
|||||||
INSERT INTO llx_accounting_journal (rowid, code, label, nature, active) VALUES (4,'OD', 'Journal des opérations diverses', 0, 1);
|
INSERT INTO llx_accounting_journal (rowid, code, label, nature, active) VALUES (4,'OD', 'Journal des opérations diverses', 0, 1);
|
||||||
INSERT INTO llx_accounting_journal (rowid, code, label, nature, active) VALUES (5,'AN', 'Journal des à-nouveaux', 9, 1);
|
INSERT INTO llx_accounting_journal (rowid, code, label, nature, active) VALUES (5,'AN', 'Journal des à-nouveaux', 9, 1);
|
||||||
|
|
||||||
|
ALTER TABLE llx_accounting_journal ADD COLUMN entity integer DEFAULT 1;
|
||||||
|
|
||||||
ALTER TABLE llx_paiementfourn ADD COLUMN model_pdf varchar(255);
|
ALTER TABLE llx_paiementfourn ADD COLUMN model_pdf varchar(255);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
create table llx_accounting_journal
|
create table llx_accounting_journal
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
entity integer DEFAULT 1,
|
||||||
code varchar(32) NOT NULL,
|
code varchar(32) NOT NULL,
|
||||||
label varchar(128) NOT NULL,
|
label varchar(128) NOT NULL,
|
||||||
nature smallint DEFAULT 0 NOT NULL, -- type of journals (1:various operations / 2:sale / 3:purchase / 4:bank / 9: has-new)
|
nature smallint DEFAULT 0 NOT NULL, -- type of journals (1:various operations / 2:sale / 3:purchase / 4:bank / 9: has-new)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user