Skip to content

Commit

Permalink
Merge pull request #4518 from FHenry/3.9_compta
Browse files Browse the repository at this point in the history
3.9 compta
  • Loading branch information
eldy committed Jan 30, 2016
2 parents b162eb1 + 6aa6c06 commit e2d9989
Show file tree
Hide file tree
Showing 11 changed files with 1,625 additions and 813 deletions.
3 changes: 2 additions & 1 deletion htdocs/accountancy/admin/export.php
Expand Up @@ -206,7 +206,8 @@
print '<td>';
$listmodelcsv=array(
'1'=>$langs->trans("Modelcsv_normal"),
'2'=>$langs->trans("Modelcsv_CEGID")
'2'=>$langs->trans("Modelcsv_CEGID"),
'3'=>$langs->trans("Modelcsv_COALA")
);
print $form->selectarray("modelcsv",$listmodelcsv,$conf->global->ACCOUNTING_EXPORT_MODELCSV,0);

Expand Down
20 changes: 16 additions & 4 deletions htdocs/accountancy/bookkeeping/card.php
Expand Up @@ -91,7 +91,7 @@
$book->sens = 'C';
}

$result = $book->update();
$result = $book->update($user);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
Expand Down Expand Up @@ -136,7 +136,7 @@
$book->sens = 'C';
}

$result = $book->create_std($user);
$result = $book->createStd($user);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
Expand Down Expand Up @@ -180,7 +180,7 @@

$book->montant = 0;

$result = $book->create_std($user);
$result = $book->createStd($user);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
Expand Down Expand Up @@ -214,6 +214,18 @@
$conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL => $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL
);

$sql = 'SELECT DISTINCT accountancy_journal FROM '.MAIN_DB_PREFIX.'bank_account WHERE clos=0';
$resql=$db->query($sql);
if (!$resql) {
setEventMessages($db->lasterror,null,'errors');
} else {
while ($obj_bank=$db->fetch_object($resql)) {
if (!empty($obj_bank->accountancy_journal)) {
$code_journal_array[$obj_bank->accountancy_journal]=$obj_bank->accountancy_journal;
}
}
}

$book = new BookKeeping($db);
$next_num_mvt = $book->getNextNumMvt();

Expand Down Expand Up @@ -259,7 +271,7 @@
print '</form>';
} else {
$book = new BookKeeping($db);
$result = $book->fetch_per_mvt($piece_num);
$result = $book->fetchPerMvt($piece_num);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
}
Expand Down

0 comments on commit e2d9989

Please sign in to comment.