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
83885261
Commit
83885261
authored
8 years ago
by
Laurent Destailleur
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #5439 from atm-arnaud/FIX_ASK_DELETE_PAYMENT_SUPPLIER_INVOICE
FIX form_confirm to delete payment on supplier invoice
parents
f8b1d0d7
cf5de9d0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/fourn/facture/card.php
+12
-3
12 additions, 3 deletions
htdocs/fourn/facture/card.php
with
12 additions
and
3 deletions
htdocs/fourn/facture/card.php
+
12
−
3
View file @
83885261
...
@@ -292,14 +292,17 @@ if (empty($reshook))
...
@@ -292,14 +292,17 @@ if (empty($reshook))
}
}
// Delete payment
// Delete payment
elseif
(
$action
==
'deletepaiement'
&&
$user
->
rights
->
fournisseur
->
facture
->
creer
)
elseif
(
$action
==
'
confirm_
delete
_
paiement'
&&
$confirm
==
'yes'
&&
$user
->
rights
->
fournisseur
->
facture
->
creer
)
{
{
$object
->
fetch
(
$id
);
$object
->
fetch
(
$id
);
if
(
$object
->
statut
==
FactureFournisseur
::
STATUS_VALIDATED
&&
$object
->
paye
==
0
)
if
(
$object
->
statut
==
FactureFournisseur
::
STATUS_VALIDATED
&&
$object
->
paye
==
0
)
{
{
$paiementfourn
=
new
PaiementFourn
(
$db
);
$paiementfourn
=
new
PaiementFourn
(
$db
);
$result
=
$paiementfourn
->
fetch
(
GETPOST
(
'paiement_id'
));
$result
=
$paiementfourn
->
fetch
(
GETPOST
(
'paiement_id'
));
if
(
$result
>
0
)
$result
=
$paiementfourn
->
delete
();
// If fetch ok and found
if
(
$result
>
0
)
{
$result
=
$paiementfourn
->
delete
();
// If fetch ok and found
header
(
"Location: "
.
$_SERVER
[
'PHP_SELF'
]
.
"?id="
.
$id
);
}
if
(
$result
<
0
)
{
if
(
$result
<
0
)
{
setEventMessages
(
$paiementfourn
->
error
,
$paiementfourn
->
errors
,
'errors'
);
setEventMessages
(
$paiementfourn
->
error
,
$paiementfourn
->
errors
,
'errors'
);
}
}
...
@@ -1725,6 +1728,12 @@ else
...
@@ -1725,6 +1728,12 @@ else
{
{
$formconfirm
=
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
,
$langs
->
trans
(
'DeleteBill'
),
$langs
->
trans
(
'ConfirmDeleteBill'
),
'confirm_delete'
,
''
,
0
,
1
);
$formconfirm
=
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
,
$langs
->
trans
(
'DeleteBill'
),
$langs
->
trans
(
'ConfirmDeleteBill'
),
'confirm_delete'
,
''
,
0
,
1
);
}
if
(
$action
==
'deletepaiement'
)
{
$payment_id
=
GETPOST
(
'paiement_id'
);
$formconfirm
=
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
.
'&paiement_id='
.
$payment_id
,
$langs
->
trans
(
'DeletePayment'
),
$langs
->
trans
(
'ConfirmDeletePayment'
),
'confirm_delete_paiement'
,
''
,
0
,
1
);
}
}
// Confirmation to delete line
// Confirmation to delete line
...
...
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