Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
070f157f
Commit
070f157f
authored
13 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Delete bank account
parent
22d63cad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/compta/bank/class/account.class.php
+15
-3
15 additions, 3 deletions
htdocs/compta/bank/class/account.class.php
htdocs/compta/bank/fiche.php
+4
-3
4 additions, 3 deletions
htdocs/compta/bank/fiche.php
with
19 additions
and
6 deletions
htdocs/compta/bank/class/account.class.php
+
15
−
3
View file @
070f157f
...
@@ -89,13 +89,15 @@ class Account extends CommonObject
...
@@ -89,13 +89,15 @@ class Account extends CommonObject
/**
/**
* Constructeur
* Constructor
*
* @param DoliDB $db Database handler
*/
*/
function
Account
(
$
DB
)
function
Account
(
$
db
)
{
{
global
$langs
;
global
$langs
;
$this
->
db
=
$
DB
;
$this
->
db
=
$
db
;
$this
->
clos
=
0
;
$this
->
clos
=
0
;
$this
->
solde
=
0
;
$this
->
solde
=
0
;
...
@@ -113,6 +115,7 @@ class Account extends CommonObject
...
@@ -113,6 +115,7 @@ class Account extends CommonObject
/**
/**
* Return if a bank account need to be conciliated
* Return if a bank account need to be conciliated
*
* @return int 1 if need to be concialiated, < 0 otherwise.
* @return int 1 if need to be concialiated, < 0 otherwise.
*/
*/
function
canBeConciliated
()
function
canBeConciliated
()
...
@@ -126,6 +129,7 @@ class Account extends CommonObject
...
@@ -126,6 +129,7 @@ class Account extends CommonObject
/**
/**
* Add a link between bank line record and its source
* Add a link between bank line record and its source
*
* @param line_id Id ecriture bancaire
* @param line_id Id ecriture bancaire
* @param url_id Id parametre url
* @param url_id Id parametre url
* @param url Url
* @param url Url
...
@@ -166,6 +170,7 @@ class Account extends CommonObject
...
@@ -166,6 +170,7 @@ class Account extends CommonObject
/**
/**
* TODO Move this into AccountLine
* TODO Move this into AccountLine
* Return array with links from llx_bank_url
* Return array with links from llx_bank_url
*
* @param fk_bank To search using bank transaction id
* @param fk_bank To search using bank transaction id
* @param url_id To search using link to
* @param url_id To search using link to
* @param type To search using type
* @param type To search using type
...
@@ -218,6 +223,7 @@ class Account extends CommonObject
...
@@ -218,6 +223,7 @@ class Account extends CommonObject
/**
/**
* Add an entry into table ".MAIN_DB_PREFIX."bank
* Add an entry into table ".MAIN_DB_PREFIX."bank
*
* @param $date Date operation
* @param $date Date operation
* @param $oper 1,2,3,4... (deprecated) or TYP,VIR,PRE,LIQ,VAD,CB,CHQ...
* @param $oper 1,2,3,4... (deprecated) or TYP,VIR,PRE,LIQ,VAD,CB,CHQ...
* @param $label Descripton
* @param $label Descripton
...
@@ -336,6 +342,7 @@ class Account extends CommonObject
...
@@ -336,6 +342,7 @@ class Account extends CommonObject
/**
/**
* Create bank account into database
* Create bank account into database
*
* @param user Object user making action
* @param user Object user making action
* @return int < 0 if KO, > 0 if OK
* @return int < 0 if KO, > 0 if OK
*/
*/
...
@@ -444,6 +451,7 @@ class Account extends CommonObject
...
@@ -444,6 +451,7 @@ class Account extends CommonObject
/**
/**
* Update bank account card
* Update bank account card
*
* @param user Object user making action
* @param user Object user making action
* @return int <0 si ko, >0 si ok
* @return int <0 si ko, >0 si ok
*/
*/
...
@@ -508,6 +516,7 @@ class Account extends CommonObject
...
@@ -508,6 +516,7 @@ class Account extends CommonObject
/**
/**
* Update BBAN (RIB) account fields
* Update BBAN (RIB) account fields
*
* @param user Object user making update
* @param user Object user making update
* @return int <0 if KO, >0 if OK
* @return int <0 if KO, >0 if OK
*/
*/
...
@@ -561,6 +570,7 @@ class Account extends CommonObject
...
@@ -561,6 +570,7 @@ class Account extends CommonObject
/**
/**
* Load a bank account into memory from database
* Load a bank account into memory from database
*
* @param id Id of bank account to get
* @param id Id of bank account to get
* @param ref Ref of bank account to get
* @param ref Ref of bank account to get
* @param ref_ext External ref of bank account to get
* @param ref_ext External ref of bank account to get
...
@@ -658,6 +668,7 @@ class Account extends CommonObject
...
@@ -658,6 +668,7 @@ class Account extends CommonObject
/**
/**
* Delete bank account from database
* Delete bank account from database
*
* @return int <0 if KO, >0 if OK
* @return int <0 if KO, >0 if OK
*/
*/
function
delete
()
function
delete
()
...
@@ -682,6 +693,7 @@ class Account extends CommonObject
...
@@ -682,6 +693,7 @@ class Account extends CommonObject
/**
/**
* Retourne le libelle du statut d'une facture (brouillon, validee, abandonnee, payee)
* Retourne le libelle du statut d'une facture (brouillon, validee, abandonnee, payee)
*
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
* @return string Libelle
* @return string Libelle
*/
*/
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/bank/fiche.php
+
4
−
3
View file @
070f157f
...
@@ -173,9 +173,10 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
...
@@ -173,9 +173,10 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
if
(
$_POST
[
"action"
]
==
'confirm_delete'
&&
$_POST
[
"confirm"
]
==
"yes"
&&
$user
->
rights
->
banque
->
configurer
)
if
(
$_POST
[
"action"
]
==
'confirm_delete'
&&
$_POST
[
"confirm"
]
==
"yes"
&&
$user
->
rights
->
banque
->
configurer
)
{
{
// Modification
// Delete
$account
=
new
Account
(
$db
,
$_GET
[
"id"
]);
$account
=
new
Account
(
$db
);
$account
->
delete
(
$_GET
[
"id"
]);
$account
->
fetch
(
$_GET
[
"id"
]);
$account
->
delete
();
header
(
"Location: "
.
DOL_URL_ROOT
.
"/compta/bank/index.php"
);
header
(
"Location: "
.
DOL_URL_ROOT
.
"/compta/bank/index.php"
);
exit
;
exit
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment