Fix add a bank account to its categoy
This commit is contained in:
parent
0e88b6a24b
commit
5441b1998b
1 changed files with 6 additions and 2 deletions
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
use Stripe\BankAccount;
|
||||
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2006-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
|
|
@ -215,12 +217,14 @@ if ($elemid && $action == 'addintocategory' &&
|
|||
$elementtype = 'user';
|
||||
} elseif ($type == Categorie::TYPE_ACCOUNT) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
$newobject = new User($db);
|
||||
$newobject = new Account($db);
|
||||
$elementtype = 'bank_account';
|
||||
} else {
|
||||
dol_print_error("Not supported value of type = ".$type);
|
||||
}
|
||||
$result = $newobject->fetch($elemid);
|
||||
|
||||
// TODO Add into categ
|
||||
// Add into categ
|
||||
$result = $object->add_type($newobject, $elementtype);
|
||||
if ($result >= 0) {
|
||||
setEventMessages($langs->trans("WasAddedSuccessfully", $newobject->ref), null, 'mesgs');
|
||||
|
|
|
|||
Loading…
Reference in a new issue